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

MyTimeout.hpp

Committer:
co838_gtvl2
Date:
2016-02-23
Revision:
8:6f30f477fa23
Parent:
6:6c61186c8739

File content as of revision 8:6f30f477fa23:

#ifndef _MYTIMEOUT_HPP_
# define _MYTIMEOUT_HPP_

# include "main.h"

/*
 *  This is my extended version over the Timeout class.
 *  It allows me to check if there is a function attached to a timeout.
 *  Thanks to this, it can prevent a timeout to be attached if there is already one running.
 *  It is useful in my case for the sleep() + interrupts so I don't lose process cylces.
 *  The function *MUST* be detached from the timeout using detach() method.
 *
 *  You can check the usage in the main.cpp file at the end of the main() function.
 */
class MyTimeout : public Timeout
{
public:
    bool    hasAttachment()
    {
        return (this->_function != NULL);
    }
};

#endif /* _MYTIMEOUT_HPP_ */