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 #define ESP8266_TX PD_5 00004 #define ESP8266_RX PD_6 00005 00006 Serial ESP8266(ESP8266_TX,ESP8266_RX,115200); 00007 00008 DigitalOut myled(LED3); 00009 00010 int main() 00011 { 00012 ESP8266.printf("AT\r\n"); 00013 wait(1); 00014 00015 ESP8266.printf("AT+SYSIOSETCFG=12,3,0\r\n"); 00016 wait(1); 00017 00018 ESP8266.printf("GPIOAT+SYSGPIODIR=12,1\r\n"); 00019 wait(1); 00020 00021 ESP8266.printf("AT+SYSGPIOWRITE=12,1\r\n"); 00022 wait(1); 00023 00024 while(1) 00025 { 00026 ESP8266.printf("AT+SYSGPIOWRITE=12,0\r\n"); 00027 wait(1); 00028 00029 ESP8266.printf("AT+SYSGPIOWRITE=12,1\r\n"); 00030 wait(1); 00031 00032 myled = !myled; 00033 } 00034 } 00035 00036 /* 00037 int main() 00038 { 00039 while(1) 00040 { 00041 ESP8266.printf("AT\r\n"); 00042 wait(1); 00043 } 00044 } 00045 */
Generated on Tue Aug 9 2022 20:10:10 by
1.7.2