This program is an advanced "IoT" thermometer using LM75B component library. It displays the current value to the Serial host in Celcius or Fahrenheit (possible to change using a switch). It also stores an historic and displays it to the user using the LCD screen. Moreover, you can change the orientation of the screen by turning the device, just like a smartphone.

Dependencies:   C12832 FXOS8700CQ LM75B mbed

Committer:
co838_gtvl2
Date:
Tue Feb 23 18:13:35 2016 +0000
Revision:
8:6f30f477fa23
Parent:
6:6c61186c8739
V1.0.1; Updated init of variables and LEDs; Removed unused file

Who changed what in which revision?

UserRevisionLine numberNew contents of line
co838_gtvl2 6:6c61186c8739 1 #ifndef _MYTIMEOUT_HPP_
co838_gtvl2 6:6c61186c8739 2 # define _MYTIMEOUT_HPP_
co838_gtvl2 6:6c61186c8739 3
co838_gtvl2 6:6c61186c8739 4 # include "main.h"
co838_gtvl2 6:6c61186c8739 5
co838_gtvl2 6:6c61186c8739 6 /*
co838_gtvl2 6:6c61186c8739 7 * This is my extended version over the Timeout class.
co838_gtvl2 6:6c61186c8739 8 * It allows me to check if there is a function attached to a timeout.
co838_gtvl2 6:6c61186c8739 9 * Thanks to this, it can prevent a timeout to be attached if there is already one running.
co838_gtvl2 6:6c61186c8739 10 * It is useful in my case for the sleep() + interrupts so I don't lose process cylces.
co838_gtvl2 8:6f30f477fa23 11 * The function *MUST* be detached from the timeout using detach() method.
co838_gtvl2 6:6c61186c8739 12 *
co838_gtvl2 6:6c61186c8739 13 * You can check the usage in the main.cpp file at the end of the main() function.
co838_gtvl2 6:6c61186c8739 14 */
co838_gtvl2 6:6c61186c8739 15 class MyTimeout : public Timeout
co838_gtvl2 6:6c61186c8739 16 {
co838_gtvl2 6:6c61186c8739 17 public:
co838_gtvl2 6:6c61186c8739 18 bool hasAttachment()
co838_gtvl2 6:6c61186c8739 19 {
co838_gtvl2 6:6c61186c8739 20 return (this->_function != NULL);
co838_gtvl2 6:6c61186c8739 21 }
co838_gtvl2 6:6c61186c8739 22 };
co838_gtvl2 6:6c61186c8739 23
co838_gtvl2 6:6c61186c8739 24 #endif /* _MYTIMEOUT_HPP_ */