working
Dependencies: C027_Support IBMIoTClientCellularExample MQTT mbed
Fork of MQTT-GSM-GPS-CAN-SMS by
Diff: main.cpp
- Revision:
- 14:6f36d75b3917
- Parent:
- 13:6a0af5deb2db
- Child:
- 15:7c3279ac3c52
diff -r 6a0af5deb2db -r 6f36d75b3917 main.cpp --- a/main.cpp Fri Mar 13 06:23:30 2015 +0000 +++ b/main.cpp Fri Mar 13 07:11:56 2015 +0000 @@ -45,22 +45,7 @@ #define MQTT_MAX_PACKET_SIZE 250 -C12832 lcd(D11, D13, D12, D7, D10); -PwmOut r(D5); -PwmOut g(D9); -PwmOut b(D8); -DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); -MMA7660 MMA(D14, D15); -LM75B sensor(D14,D15); -DigitalIn Up(A2); DigitalIn Down(A3); DigitalIn Left(A4); DigitalIn Right(A5); DigitalIn Click(D4); -AnalogIn ain1 (A0); AnalogIn ain2 (A1); - -#define LED2_OFF 0 -#define LED2_ON 1 - -#define DEFAULT_TYPE_NAME "iotsample-mbed-c027" - - //------------------------------------------------------------------------------------ +//------------------------------------------------------------------------------------ // You need to configure these cellular modem / SIM parameters. // These parameters are ignored for LISA-C200 variants and can be left NULL. //------------------------------------------------------------------------------------ @@ -77,10 +62,25 @@ # define PASSWORD NULL //------------------------------------------------------------------------------------ +C12832 lcd(D11, D13, D12, D7, D10); +PwmOut r(D5); +PwmOut g(D9); +PwmOut b(D8); +DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); +MMA7660 MMA(D14, D15); +LM75B sensor(D14,D15); +DigitalIn Up(A2); DigitalIn Down(A3); DigitalIn Left(A4); DigitalIn Right(A5); DigitalIn Click(D4); +AnalogIn ain1 (A0); AnalogIn ain2 (A1); + +#define LED2_OFF 0 +#define LED2_ON 1 + +static uint32_t linkStatus(void) { return true; } + +#define DEFAULT_TYPE_NAME "iotsample-mbed-c027" + #define MQTT_CLIENT_TYPE MQTTSocket #include "MQTTSocket.h" -// need a wrapper since K64F and LPC1768 wont have the same name for mii read methods -static uint32_t linkStatus(void) { return true; } bool quickstartMode = true; char org[11] = ORG;