Hello,
So I have a project that is using a simple voltage divider. Two 10K resistors from a 5V. When I try and read it with the Teensy, I am getting around 4.0 voltage, but I even verified it with my fluke that it is at 2.5V!!! Why would my teensy not read the proper voltage.
Here is the Code I am using. Could the ADC be screwed up? It does change when I change the voltage divider, but it kinda seems it is always 1V above the true voltage. :/
void setup()
{
Serial.begin(9600);
}
void loop()
{
int sensorValue = analogRead(A9);
float voltage = sensorValue * (5.0 / 1023.0);
Serial.println(voltage);
}
So I have a project that is using a simple voltage divider. Two 10K resistors from a 5V. When I try and read it with the Teensy, I am getting around 4.0 voltage, but I even verified it with my fluke that it is at 2.5V!!! Why would my teensy not read the proper voltage.
Here is the Code I am using. Could the ADC be screwed up? It does change when I change the voltage divider, but it kinda seems it is always 1V above the true voltage. :/
void setup()
{
Serial.begin(9600);
}
void loop()
{
int sensorValue = analogRead(A9);
float voltage = sensorValue * (5.0 / 1023.0);
Serial.println(voltage);
}