Professional Documents
Culture Documents
Slave Blue
Slave Blue
Slave Blue
h>
void setup() {
Serial.begin(9600);
bluetooth.begin(9600); // Initialize Bluetooth module
analogReference(DEFAULT);
// Set the reference voltage to the default (typically 5V)
}
void loop() {
// Read the sensor values and add them to the sum
for (int i = 0; i < numReadings; i++) {
sensorSum += analogRead(sensorPin);
delay(50); // Optional delay between readings
}