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 test_thread by
Revision 5:bdabacd90f75, committed 2017-01-14
- Comitter:
- RahulSitaram
- Date:
- Sat Jan 14 06:42:58 2017 +0000
- Parent:
- 4:fd0d5e707091
- Commit message:
- Committed on 14-01-2017 12:10 PM
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jan 09 18:00:57 2017 +0000
+++ b/main.cpp Sat Jan 14 06:42:58 2017 +0000
@@ -21,16 +21,15 @@
Wifi.printf("GET reneproj.esy.es/");
Wifi.printf("peach/index.php?device_token=jabv5su2&device");
Wifi.printf("_id=gr_peach1&command4u=00 HTTP/1.1\r\n");
- if(Wifi.readable()){
+ }
+}
+void read_from_wifi(){
+ if(Wifi.readable()){
while(Wifi.readable()){
read_data = Wifi.getc();
pc.putc(read_data);
}
}
- }
-}
-void send_to_device(string command){
-
}
void setup_esp8266(){
@@ -63,8 +62,8 @@
}
int main() {
+ Wifi.attach(&read_from_wifi);
setup_esp8266();
- uint8_t data[3] = {0x47, 0x32, 0xA7};
while (true) {
wait(10);
}
