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.
Fork of mbed-os-example-mbed5-blinky by
main.cpp
00001 #include "mbed.h" 00002 #include "ATParser.h" 00003 00004 DigitalOut boot(D2); 00005 DigitalOut status(D4); 00006 BufferedSerial _serial(D1, D0, 1024); 00007 ATParser _parser(_serial); 00008 00009 int main() { 00010 // Enter into data transmission / AT command mode 00011 boot = 1; 00012 status = 1; 00013 00014 // Set the default factory parameters 00015 int res = _parser.send("AT+FAT=ON") // Enter into AT command mode 00016 && _parser.recv("+OK") 00017 && _parser.send("AT+FMODE=AT_NONE") // Enter into AT command mode with WLAN, TCP and UDP closed 00018 && _parser.recv("+OK") 00019 && _parser.send("AT+FEVENT=OFF") // Event notification off 00020 && _parser.recv("+OK") 00021 && _parser.send("AT+FBONJOUR=OFF") // Bonjour off 00022 && _parser.recv("+OK") 00023 && _parser.send("AT+FWMODE=STA") // Enter into STA mode 00024 && _parser.recv("+OK") 00025 && _parser.send("AT+SAVE") // Save all the setting 00026 && _parser.recv("+OK") 00027 && _parser.send("AT+FACTORY") // Reboot 00028 && _parser.recv("+OK"); 00029 00030 if (!res) 00031 printf("EMW3162 config failed!\n"); 00032 else 00033 printf("EMW3162 config success!\n"); 00034 return 0; 00035 } 00036
Generated on Tue Jul 19 2022 16:22:32 by
1.7.2
