temp_FIAP porting to FRDM-K64F
Dependencies: C12832 EthernetInterface FiapV2 HTTPClientForSOAP LM75B NTPClient mbed-rtos mbed spxml
Fork of temp_FIAP by
NOT tested
Diff: main.cpp
- Revision:
- 4:c3338ccbd213
- Parent:
- 2:930f87d8765f
diff -r 536b3d6e1555 -r c3338ccbd213 main.cpp --- a/main.cpp Wed Aug 22 02:32:14 2012 +0000 +++ b/main.cpp Mon Apr 13 04:03:31 2015 +0000 @@ -1,5 +1,9 @@ #include "mbed.h" -#include "TextLCD.h" +//#include "TextLCD.h" +#include "C12832.h" +#include "LM75B.h" + + #include "EthernetInterface.h" #include "NTPClient.h" #include "fiap.h" @@ -11,9 +15,13 @@ Ticker timer1; time_t ctTime; -TextLCD lcd(p24, p26, p27, p28, p29, p30); -AnalogIn ain(p15); +//TextLCD lcd(p24, p26, p27, p28, p29, p30); +// Using Arduino pin notation +C12832 lcd(D11, D13, D12, D7, D10); +//AnalogIn ain(p15); DigitalOut led(LED1); +LM75B sensor(D14,D15); + char timezone[] = "+09:00"; // JST char atemp[6]; FIAP fiap("http://192.168.1.3/axis2/services/FIAPStorage"); @@ -27,7 +35,8 @@ float temp; char buffer[9]; led=!led; - temp=ain*3.3*100.0; +// temp=ain*3.3*100.0; + temp=sensor.temp(); ctTime = time(NULL); strftime(buffer,9,"%X",localtime(&ctTime)); lcd.locate(0,1);