Hey Guys, this is my first post.
I recently bought a Teensy 2.0++ and an Arduino Uno.
Iv'e managed well with programming and haven't any issues so far however I'm
struggling to read analog in signals from a 50k potentiometer.
Iv'e used the same code for the Arduino Uno and works perfectly.
To my understanding the left pin goes to the +5v pin on the breadboard, the middle
pin goes to the analog input pin on the Teensy and the right pin goes to the ground on the breadboard.
And before anyone asks, yes Ive wired the +5v and the GND to the appropriate pins on the breadboard.
Thanks in advance to anyone who comments, Dafydd.
This is the code i used just to test the pot:
I recently bought a Teensy 2.0++ and an Arduino Uno.
Iv'e managed well with programming and haven't any issues so far however I'm
struggling to read analog in signals from a 50k potentiometer.
Iv'e used the same code for the Arduino Uno and works perfectly.
To my understanding the left pin goes to the +5v pin on the breadboard, the middle
pin goes to the analog input pin on the Teensy and the right pin goes to the ground on the breadboard.
And before anyone asks, yes Ive wired the +5v and the GND to the appropriate pins on the breadboard.
Thanks in advance to anyone who comments, Dafydd.
This is the code i used just to test the pot:
Code:
int pot = 45;
void setup(){
Serial.begin(9600);
pinMode(pot, INPUT);
}
void loop(){
int potValue = analogRead(pot);
Serial.println(potValue);
}