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.
Dependencies: 4DGL-uLCD-SE mbed
TestSuite.cpp
00001 #include "TestSuite.h" 00002 #include "LEDControl.h" 00003 #include "LCDControl.h" 00004 #include "WifiControl.h" 00005 #include "Reporter.h" 00006 #include "APVectorBuilder.h" 00007 00008 void TestSuite::ReporterTest(){ 00009 00010 Reporter report; 00011 00012 } 00013 00014 void TestSuite::LEDTest(){ 00015 00016 LEDControl led; 00017 led.update(20); 00018 wait(2); 00019 led.update(0); 00020 }; 00021 00022 void TestSuite::LCDTest(){ 00023 LCDControl lcd; 00024 00025 lcd.printStrength(10); 00026 00027 00028 }; 00029 00030 void TestSuite::WifiTest(){ 00031 00032 WifiControl wifi; 00033 wifi.ESPconfig(); 00034 00035 00036 00037 } 00038 00039 void TestSuite::vectorTest() { 00040 Serial pc(USBTX, USBRX); 00041 pc.baud(115200); 00042 pc.printf("start"); 00043 00044 APVectorBuilder builder; 00045 string str = 00046 "AT+CWLAP" 00047 "+CWLAP:(4,\"ATTvTZK3MS\",-90,\"d4:04:cd:8e:92:50\",1)" 00048 "+CWLAP:(4,\"HOME-D596\",-88,\"c4:27:95:61:d5:96\",1)" 00049 "+CWLAP:(4,\"Grubbs_Wireless\",-67,\"c0:3f:0e:9f:33:aa\",1)" 00050 "+CWLAP:(3,\"MOTOROLA-7EBA1\",-58,\"20:10:7a:03:f9:4e\",1)" 00051 "+CWLAP:(4,\"james\",-66,\"c4:27:95:4f:e7:56\",1)" 00052 "+CWLAP:(0,\"xfinitywifi\",-67,\"c6:27:95:4f:e7:58\",1)" 00053 "+CWLAP:(3,\"MIMASHI3703\",-64,\"a0:63:91:5a:82:33\",6)" 00054 "+CWLAP:(4,\"PrincessK&B\",-79,\"10:05:b1:1e:da:f0\",6)" 00055 "+CWLAP:(4,\"ATT2F2H6J3\",-68,\"e0:b7:0a:73:81:70\",6)" 00056 "+CWLAP:(3,\"god\",-49,\"20:aa:4b:47:8d:e2\",6)" 00057 "+CWLAP:(4,\"HOME-8787\",-84,\"e0:88:5d:3c:87:87\",6)" 00058 "+CWLAP:(4,\"ATTVrH5TA2\",-84,\"3c:df:a9:79:d7:b0\",6)" 00059 "+CWLAP:(0,\"xfinitywifi\",-86,\"e2:88:5d:3c:87:89\",6)" 00060 "+CWLAP:(3,\"StarCraftII\",-85,\"50:6a:03:7d:c7:0b\",6)" 00061 "+CWLAP:(4,\"HOME-9A32\",-86,\"98:6b:3d:34:9a:30\",11)" 00062 "+CWLAP:(4,\"Mwillii\",-61,\"10:05:b1:1e:e0:20\",11)" 00063 "+CWLAP:(0,\"xfinitywifi\",-86,\"96:6b:3d:34:9a:30\",11)"; 00064 00065 vector<AccessPoint> APList = builder.build(str); 00066 00067 for (int i = 0; i < 5; i++){ 00068 pc.printf("\r\nList Element: %s, %d", APList[i].getSSID(), APList[i].getStrength()); 00069 } 00070 } 00071 00072 00073
Generated on Sat Jul 16 2022 07:55:27 by
1.7.2