potatomasher
Member
i'm trying to understand how to use the analog pins with the teensy...i'm pretty new to arduino and teensy so pardon the stupid question. when you declare variables do you call the analog pins A0-A9 or do you call them 14-23? i've been trying to get some potentiometers wired up for a joystick setup for using in a flight sim, but no matter how hard i try to get them to serial print i can't get any values.
i've been using the basic arduino analog serial read example to try to get any output but to no avail. when i tried with my uno i was able to get it to work.
tried the below and tried it with A0 with no success. thoughts?
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(14);
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}
i've been using the basic arduino analog serial read example to try to get any output but to no avail. when i tried with my uno i was able to get it to work.
tried the below and tried it with A0 with no success. thoughts?
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(14);
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}