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

17.6 PROJECT 1—MEASURING AND DISPLAYING THE HUMIDITY, TEMPERATURE, ATMOSPHERIC PRESSURE  413




















































            FIG. 17.7,  CONT’D



              At the beginning of the program header files mbed.h and XNucleoIKS01A2.h are
            included in the program. The PC serial interface and the interface between the expansion
            board and the development board are then defined. The handles for the humidity-
            temperature and pressure sensors are defined. Inside the main program the humidity-
            temperature sensor and pressure sensor modules are enabled. The program then enters an
            endless loop created using a while statement. Inside this loop the humidity, temperature,
            and pressure are read from the expansion board and stored in floating point variables
   422   423   424   425   426   427   428   429   430   431   432