Wifi module configuration for GR_Peach
Dependencies: mbed
Revision 2:19bd6403dc75, committed 2017-01-04
- Comitter:
- akverma
- Date:
- Wed Jan 04 07:42:43 2017 +0000
- Parent:
- 1:e5ef21ebff5f
- Commit message:
- Wifi module working;
Changed in this revision
Wifi.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e5ef21ebff5f -r 19bd6403dc75 Wifi.cpp --- a/Wifi.cpp Tue Dec 06 14:14:51 2016 +0000 +++ b/Wifi.cpp Wed Jan 04 07:42:43 2017 +0000 @@ -9,22 +9,22 @@ uint8_t wifi_ack; Serial pc(USBTX, USBRX); //Serial Wifi(P2_14,P2_15); -Serial Wifi(P2_14, P2_15); +Serial Wifi(P5_0, P5_1); bool i = true; bool j = false; char MSB; char LSB; - + /* void call() { // Note: you need to actually read from the serial to clear the RX interrupt data = Wifi.getc(); pc.printf("%c\n", data); // Wifi.printf("%c",data); -} +}*/ int main() { - + char c,d; //pc.attach(&call); pc.baud(9600); Wifi.baud(115200); @@ -55,24 +55,24 @@ while(Wifi.readable()) { // The esp has data so display its output to the serial window - char c = Wifi.getc(); // read the next character. + c = Wifi.getc(); // read the next character. pc.putc(c); //pc.printf("%c", c); - i=~i; + //i=~i; } } - if(pc.readable()) // check if the esp is sending a message + if(pc.readable()) // check if the esp is sending a message { while(pc.readable()) { // The esp has data so display its output to the serial window - char d = pc.getc(); // read the next character. + d = pc.getc(); // read the next character. Wifi.putc(d); //pc.printf("%c", c); - j=~j; + //j=~j; } } - led1=i; - led2=j; +// led1=i; +// led2=j; } } \ No newline at end of file