Monitors temperature using lm75b temperature sensor and it sends the data to thingspeak using esp8266 WIFI module.

Dependencies:   mbed LM75B

main.cpp

Committer:
dewantkatare
Date:
2019-04-15
Revision:
2:e259a0cfc9f1
Parent:
1:8ab009672555

File content as of revision 2:e259a0cfc9f1:

#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);
    }         
}