I'm trying to connect a piezo element to a Teensy 3.2, but it doesn't seem to work. No data is showing up in the Monitor or Plotter.
Code:
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A9);
// print out the value you read:
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}
Image of piezo connected to the Teensy 3.2. The piezo ground wire is connected to GND, and the other wire connected to a9.
https://i.imgsafe.org/385f33d011.jpg
What am I doing wrong?
Code:
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A9);
// print out the value you read:
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}
Image of piezo connected to the Teensy 3.2. The piezo ground wire is connected to GND, and the other wire connected to a9.
https://i.imgsafe.org/385f33d011.jpg
What am I doing wrong?
Last edited: