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
Arduino

5 years ago
/*
*/
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(" ");
5 years ago
Serial.print(analogRead(1));
Serial.print(" ");
5 years ago
Serial.print(analogRead(2));
Serial.print(" ");
5 years ago
Serial.println(analogRead(3));
// int thisPitch = map(sensorReading, 400, 1000, 120, 1500);
5 years ago
// play the pitch:
// tone(11, thisPitch, 10);
5 years ago
delay(250); // delay in between reads for stability
}