Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
You do not have the correct permissions to perform this operation. Please, contact us at support@mbed.com to gain full access.
×
Hi, I'm using a PCF8591 to read voltage from a sensor(0 to 5V) and then display it via my MBED on the pc using tera term. The voltage is reading correctly, but at random it displays a wrong value....as shown below.(data upto 6 decimal places is necessary)
the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.394531 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.375000 the voltage is 4.394531
The MBED code I have written is as below
How can i rectify the error. i.e. only one constant value needs to be read.