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
Diff: src/Whiffy.cpp
- Revision:
- 17:4d0e180cde20
- Parent:
- 13:ef68cbcb4e9a
- Child:
- 18:94536dca963c
--- a/src/Whiffy.cpp Tue Oct 20 09:32:35 2015 +0000 +++ b/src/Whiffy.cpp Tue Oct 20 12:38:02 2015 +0000 @@ -3,12 +3,54 @@ Whiffy::Whiffy() : wifi(), reporter(){ + Serial pc(USBTX, USBRX); + pc.baud(115200); + pc.printf("\r\nReporter & WifiControl created\r\n"); + }; void Whiffy::update() { + Serial pc(USBTX, USBRX); + pc.baud(115200); + wait(2); + pc.printf("\r\n\r\nCreating APVectorBuilder\r\n"); + wait(2); + APVectorBuilder apBuilder; + wait(2); + while(true) { + pc.printf("\r\nGetting AP list\r\n"); + wait(2); + string real(wifi.pollAP()); //Get list of APs + wait(2); + pc.printf("\r\nVectorizing AP list\r\n"); + wait(2); + vector<AccessPoint> APList(apBuilder.build(real)); //Finish building AP list + wait(2); + pc.printf("\r\nSending AP list to reporter\r\n"); + wait(1); + pc.printf("5th element: %s\r\n", APList[5].getSSID().c_str()); + wait(2); + reporter.update(APList); + } + + + + + + //pc.printf("Access points found: \r\n"); + //pc.printf("%s", real.c_str()); + + + + + //pc.printf("\r\n\r\n Access Point information ------------- \r\n\r\n"); + // Print elements + //for (int i = 0; i < APList.size(); i++){ + // pc.printf("\r\nList Element: %s, %d", APList[i].getSSID(), APList[i].getStrength()); + //} }