Page 213 - ARM Based Microcontroller Projects Using MBED
P. 213

8.21  PROJECT 17—ANALOG TEMPERATURE SENSOR (DIGITAL THERMOMETER)  199






































            FIG. 8.63  The project on a breadboard.






                    BEGIN
                           Clear the screen and home the cursor
                           Display heading
                           DO FOREVER
                                  Read the sensor voltage as digital value
                                  Convert the reading into voltage in mV
                                  Convert the reading into degrees Centigrade
                                  Display the temperature in degrees Centigrade
                                  Wait one second
                           ENDDO
                    END
            FIG. 8.64  Program PDL.
   208   209   210   211   212   213   214   215   216   217   218