Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of StarterKit by
Diff: main.cpp
- Revision:
- 11:e6602513730f
- Parent:
- 8:b08ec94d9e9f
- Child:
- 12:7c94ec5069dc
diff -r df54436ecd38 -r e6602513730f main.cpp --- a/main.cpp Mon Jul 11 23:54:24 2016 +0000 +++ b/main.cpp Tue Jul 12 03:11:05 2016 +0000 @@ -7,6 +7,9 @@ #include "wnc_control.h" #include "sensors.h" +#include "hardware.h" +I2C i2c(PTC11, PTC10); //SDA, SCL -- define the I2C pins being used + // comment out the following line if color is not supported on the terminal #define USE_COLOR #ifdef USE_COLOR @@ -291,6 +294,8 @@ printf("Temp is: %0.2f F \n\r",CTOF(hts221.readTemperature())); printf("Humid is: %02d %%\n\r",hts221.readHumidity()); + sensors_init(); + // Initialize the modem printf(GRN "Modem initializing... will take up to 60 seconds" DEF "\r\n"); i=mdm_init(); @@ -305,7 +310,6 @@ // Resolve URL to IP address to connect to resolve_mdm(); - sensors_init(); //Create a 1ms timer tick function: OneMsTicker.attach(OneMsFunction, 0.001f) ; iTimer1Interval_ms = 5000; //5 seconds