Tweet to #DrivingIoT and get some candy
Dependencies: EthernetInterface HTTPClient mbed-rtos mbed
Fork of FreedomK64F_Ethernet by
Tweet for Candy, Images of the build
Descriptions will be added and pages need to be organized on the Wiki
Revision 2:4e65bd216494, committed 2015-02-09
- Comitter:
- Spookmx
- Date:
- Mon Feb 09 18:59:23 2015 +0000
- Parent:
- 1:9eb6f83066db
- Commit message:
- Final URL for production tweet check service
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 9eb6f83066db -r 4e65bd216494 main.cpp --- a/main.cpp Thu Nov 27 00:05:40 2014 +0000 +++ b/main.cpp Mon Feb 09 18:59:23 2015 +0000 @@ -23,7 +23,7 @@ { //GET data printf("\nTrying to fetch page...\n"); - int ret = http.get("http://joseromero.mx/checkColor.php", str, 128); + int ret = http.get("http://iot.freescale.com/components/com_ohanah/checkColor.php", str, 128); if (!ret) { if(strcmp(str,"AUTHORIZED")== 0) { led_green = 1; @@ -54,7 +54,7 @@ led_red = 1; led_blue = 1; } else { - led_green = 0; + led_green = 0; // If the server provides a different response go to YELLOW, check server side code. led_red = 0; led_blue = 1; } @@ -75,7 +75,7 @@ led_blue = 1; ENABLED = 1; READY = 1; - //pc.printf("Starting setting color.\n"); + while (true) { check_color(); wait(5); // Check for a tweet every 5 seconds