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.
main.cpp
00001 #include "mbed.h" 00002 00003 //------------------------------------ 00004 // Hyperterminal configuration 00005 // 9600 bauds, 8-bit data, no parity 00006 //------------------------------------ 00007 00008 Serial esp8266(D6, D7);//tx, rx 00009 DigitalOut led(D2); 00010 DigitalOut relay(D3); 00011 00012 int main() { 00013 while(1){ 00014 if (esp8266.readable()){ 00015 char val = esp8266.getc(); 00016 switch (val){ 00017 case 'a': 00018 led = !led; 00019 break; 00020 case 'b': 00021 relay = !relay; 00022 break; 00023 } 00024 } 00025 } 00026 } 00027
Generated on Wed Jul 20 2022 01:09:10 by
1.7.2