Skip to menu

Robotics with Object Pascal

ESP32-S3 super mini experience

Sound Sensor Test

2025.04.27 21:48

me Views:919

char s[50];  // for formatted output using sprintf

void setup() {
  // initialize serial communication at 115200 bits per second:
  Serial.begin(115200);

  //set the resolution to 12 bits (0-4095)
  analogReadResolution(12);
}

void loop() {
  // read the analog / millivolts value for pin 6:
  int analogValue = analogRead(6);
  int analogVolts = analogReadMilliVolts(2);

  sprintf(s, "%4d, %4d", analogValue-1800, analogVolts);
  Serial.println(s);
 
  delay(50);  // delay in between reads for clear read from serial
}

 

SoundSensorDemo.png

 

No. Subject Author Date Views
Notice For the first time user of ESP32-S3 super mini users. me 2025.04.25 1294
16 Other Approach proposed by Gemini me 2025.10.02 604
15 Data Route me 2025.10.02 678
14 Extra Hardware Serial + JSON servo control file me 2025.09.22 446
13 Wheel Arc movement with continous servos file me 2025.09.21 406
12 3 Servo Test file me 2025.09.21 417
11 Object Pascal App getting data from ESP32-S3 (Parsing) file me 2025.04.29 889
» Sound Sensor Test file me 2025.04.27 919
9 Laser distance sensor VL53L0X file me 2025.04.27 950
8 9DOF : Getting Pitch & Roll with ICM20948 v2 file me 2025.04.27 918
7 Formating output file me 2025.04.27 871
6 Blinking Built-in RGB without delay() me 2025.04.25 5902
5 Built-in RGB led Demo me 2025.04.25 1081
4 Servo Demo me 2025.04.25 873
3 HMC5883L Compass demo file me 2025.04.25 1118
2 I2C Address Search file me 2025.04.25 930
1 Serial Sample (ASCII Table) file me 2025.04.25 1076