I thought that the mbed supports a 5v ADC range, am I right?
I hooked up a gyro that outputs a 5v range. When the gyro is not moving, it outputs 2.5v (confirmed with O-scope), yet my mbed reads .72, or 3.6v. Why is this happening? This is also happening with the temperature output, where the voltage is 2.5v at 25C.
The sensor is a ADXRS613.
Code:
#include "mbed.h"
#include "TextLCD.h"
TextLCD lcdd(p21, p22, p23, p24, p25, p26, p29,16,2);
AnalogIn gyro(p20);
AnalogIn temp(p19);
int main() {
while(1){
lcdd.cls();
lcdd.printf("%f \n%f",gyro.read()*5,temp.read()*5);
wait(.1);
}
}
I thought that the mbed supports a 5v ADC range, am I right?
I hooked up a gyro that outputs a 5v range. When the gyro is not moving, it outputs 2.5v (confirmed with O-scope), yet my mbed reads .72, or 3.6v. Why is this happening? This is also happening with the temperature output, where the voltage is 2.5v at 25C.
The sensor is a ADXRS613.
Code: