Monitors temperature using lm75b temperature sensor and it sends the data to thingspeak using esp8266 WIFI module.
Revision 3:fe883b7568ba, committed 2019-05-03
- Comitter:
- lwettel
- Date:
- Fri May 03 19:55:01 2019 +0000
- Parent:
- 2:e259a0cfc9f1
- Commit message:
- Monitor temperature in real time and sends readings to thingspeak
Changed in this revision
main.cpp | Show diff for this revision Revisions of this file |
diff -r e259a0cfc9f1 -r fe883b7568ba main.cpp --- a/main.cpp Mon Apr 15 18:02:44 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -#include "mbed.h" -#include "LM75B.h" - - -Serial pc(USBTX, USBRX); -DigitalOut led1(LED1); - -LM75B Temp(PTE25, PTE24); //SDA, SCL, ADDRESS - - - - - -int main() -{ - pc.baud(115200); - //pc.printf("BOARD %s\r\n", board); - - //Temp.write(0x01, 0x00); - - while(1) - { - pc.printf("The temp is: %4.2f degree Celsius\n\r", Temp.read()); - led1 = !led1; - wait(2); - } -} - \ No newline at end of file