Bulme lib for temp sensor LM75B
Dependents: mbed-os-example-wifi-ThingSpeak mbed_freeRTOS_send STM_Statemachine
Diff: LM75B.h
- Revision:
- 0:29546bb2c7dd
diff -r 000000000000 -r 29546bb2c7dd LM75B.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LM75B.h Mon Mar 14 13:23:07 2016 +0000 @@ -0,0 +1,24 @@ +#ifndef LM75B_H +#define LM75B_H + +#include "mbed.h" + +// LM75B Adresse +#define LM75B_ADDR 0x90 + +// LM75B Register +#define LM75B_CONF 0x01 +#define LM75B_TEMP 0x00 + +class LM75B +{ +public: + LM75B(PinName sda, PinName scl); // I2C Pins übergeben p28, p27 + ~LM75B(); + float read(); + +private: + char cmd[2]; + I2C i2c; +}; +#endif \ No newline at end of file