mbed application board program with most libraries pulled in to create a feature rich starting point for hackathons
Dependencies: C12832_lcd EthernetInterface HTTPClient LM75B MMA7660 mbed-rtos mbed
Fork of HTTPClient_HelloWorld by
AT&T M2M Mobile App Hackathon
- DFW 09-14 & 09-15
- Attendee List
- API Details
- Winning team pitches idea to ATT Executives on Tuesday 09-17-2013
Team's Project Pitch Notes
- Car location and tracking system (GPS + Wifi + Cellular)
- Temperature / auto vent control for home and industrial use (cellular + servo)
- GPS triangulation (sonar + cellular)
- Emergency Tool (Low cost OnStar / Sync Emergency Assistance)
- Remote Video Conference: Tele-presense (cellular and buttons. Rest was web services)
- M2M Billboard (LED + Cellular)
- Order management (restaurants) - Interrupt driven service. Not polled by wait staff (level sensor and cellular)
- pool manager (simulated ph and chem readings -> cellular)
- sprest - learning electronic sprinkler system (simulated moisture and weather readings -> cellular)
- safe traffic signals: stoprite (lots of statistics, used buttons and toy cars to create a scenario)
- Ecosense
Keywords Used Frequently During Presentation
- real-time
- MQTT
- Arduino
- 2lemetry
- HTML5
- Big data
- Server side
Participants
- ARM mbed
- low use. No wifly modules and little/no wired Ethernet
- ATT Github page with arduino stuff
- 2lemetry
- MSFT
- One group hacked on windows phone, rest on android / iphone
- Most were HTML5 (better looking ones)
Pictures from the Event
main.cpp
- Committer:
- atthackathon
- Date:
- 2013-09-15
- Revision:
- 7:f50a7529de41
- Parent:
- 5:83c272535884
File content as of revision 7:f50a7529de41:
#include "mbed.h" // Ethernet #include "EthernetInterface.h" #include "HTTPClient.h" EthernetInterface eth; HTTPClient http; #define WEBPAGE_BUF_SIZE 4096 char str[WEBPAGE_BUF_SIZE]; //LCD #include "C12832_lcd.h" C12832_LCD lcd; // joystick pins and LED BusIn joystick(p15,p12,p13,p16); DigitalIn enter(p14); BusOut led(LED1,LED2,LED3,LED4); Ticker joystick_to_led; void joystickHandler(void) { led = (enter) ? 0xf : joystick; } // Accelerometer #include "MMA7660.h" MMA7660 accelerometer(p28, p27); // RGB LED PwmOut r(p23); PwmOut g(p24); PwmOut b(p25); // Temp sensor #include "LM75B.h" LM75B temp(p28,p27); //char const *URL = "http://mbed.org/media/uploads/donatien/hello.txt"; //char const *URL = "http://mbed.org/"; char const *URL = "http://www.att.com/"; char const MAC[] = {0x00,0x02,0xF7,0xF0,0x00,0x00}; void mbed_mac_address(char *mac) { memcpy(mac, MAC, sizeof(MAC)); } int main() { r = g = b = 1.0f; joystick_to_led.attach(&joystickHandler, 0.001f); lcd.printf ("Bootstrap Complete!\n"); // Prepare to use DHCP if (0 != eth.init()) { error("Init Failed\n"); } // Try to get an IPAddress if (0 != eth.connect(30000)) { error("Connect Failed: Check ethernet connection or try to increase the timeout\n"); } // Now we are part of the network printf("IP Address: %s\n", eth.getIPAddress()); lcd.cls(); lcd.locate(0,0); lcd.printf("TCP/IPv4: %s\n", eth.getIPAddress()); //GET data printf("Trying to fetch page %s\n", URL); if(!http.get(URL, str, WEBPAGE_BUF_SIZE)) { printf("Page fetched successfully - read %d characters\n", strlen(str)); printf("Result: %s\n", str); } else { printf("Error - HTTP return code = %d\n", http.getHTTPResponseCode()); } eth.disconnect(); while(1) { // print the temperature to the LCD float tmp_temp = (temp.read() * 1.8f ) + 32.0f; lcd.locate(8,10); lcd.printf("Temp: %.1fF", tmp_temp); // print and display the gyro data float x = fabs(accelerometer.x()); float y = fabs(accelerometer.y()); float z = fabs(accelerometer.z()); r = 1.0f - x; g = 1.0f - y; b = z; lcd.locate(8,20); lcd.printf("X: %2.1f Y:%2.1f Z:%2.1f\n", x, y, z); } }