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 Serial esp8266(D6, D7);//tx, rx 00004 DigitalOut led(D2); 00005 00006 int main() { 00007 esp8266.baud(115200); 00008 while(1){ 00009 if (esp8266.readable()){ 00010 char val = esp8266.getc(); 00011 switch (val){ 00012 case 'a': 00013 led = 1; 00014 esp8266.putc(led); 00015 break; 00016 case 'b': 00017 led = 0; 00018 esp8266.putc(led); 00019 break; 00020 } 00021 } 00022 } 00023 } 00024
Generated on Wed Aug 24 2022 03:43:06 by
1.7.2