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

394                           16. INTERNET OF THINGS (IOT)












































                 FIG. 16.6  The project built using three development boards.




                 16.3.6 The PDL
                   Fig. 16.7 shows the program PDL of each node.


                 16.3.7 Program Listing
                   There are three programs in this project, one for each node. Fig. 16.8 shows the program
                 (program: IoTTemperature) for node IoTTemperature. At the beginning of this program the
                                                                                        2
                 Bluetooth port is defined where TX is PA_9 and RX is PA_10 respectively. The I C interface
                 between the development board and the TMP102 temperature sensor chip is defined. As
                 explained in Chapter 11, the program reads the ambient temperature. The temperature is
                 converted into degrees Centigrade and is sent through the Bluetooth module every 15s
                 using statement bluetooth.printf as a floating point data in the format %5.2f, that is, in
                 the form nn.nn.
   403   404   405   406   407   408   409   410   411   412   413