1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
yu10078999
Date:
Sun Sep 04 03:46:12 2016 +0000
Parent:
0:459c997f4e02
Commit message:
2

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Sep 04 03:12:52 2016 +0000
+++ b/main.cpp	Sun Sep 04 03:46:12 2016 +0000
@@ -4,18 +4,17 @@
 DigitalOut led(D2);
  
 int main() {
+            esp8266.baud(115200);
     while(1){
         if (esp8266.readable()){
             char val = esp8266.getc();
             switch (val){
             case 'a':
             led = 1;
-            val=led.read();
             esp8266.putc(led);
             break;
             case 'b':
             led = 0;
-            val=led.read();
             esp8266.putc(led);
             break;
             }