You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
563 B
C++

/*
*/
void setup() {
// initialize serial communications (for debugging only):
Serial.begin(9600);
}
void loop() {
// read the sensor:
// print the sensor reading so you know its range
Serial.print(analogRead(0));
Serial.print(" ");
Serial.print(analogRead(1));
Serial.print(" ");
Serial.print(analogRead(2));
Serial.print(" ");
Serial.println(analogRead(3));
// int thisPitch = map(sensorReading, 400, 1000, 120, 1500);
// play the pitch:
// tone(11, thisPitch, 10);
delay(250); // delay in between reads for stability
}