Connect to SSID, get ip by dhcp, ping google.com, display statistics
Dependencies: NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed
Fork of cc3000_ping_demo by
Diff: main.cpp
- Revision:
- 10:b98f2d6e6da5
- Parent:
- 7:fbc17364ea63
--- a/main.cpp Tue Jun 03 08:43:07 2014 +0000 +++ b/main.cpp Wed Jun 25 06:12:22 2014 +0000 @@ -27,10 +27,17 @@ cc3000 wifi(p28, p27, p30, SPI(p21, p14, p37), "ssid", "key", WPA2, false); Serial pc(UART_TX, UART_RX); #elif (MY_BOARD == MBED_BOARD_EXAMPLE) -cc3000 wifi(p9, p10, p8, SPI(p5, p6, p7), "ssid", "key", WPA2, false); +//cc3000 wifi(p9, p10, p8, SPI(p5, p6, p7), "ssid", "key", WPA2, false); +//Serial pc(USBTX, USBRX); +cc3000 wifi(D3, D5, D10, SPI(SPI_MOSI, SPI_MISO, SPI_SCK), "ssid", "key", WPA2, false); Serial pc(USBTX, USBRX); + +//printf("pin selection Ok. \r\n"); + #else + + #endif /** @@ -40,10 +47,12 @@ */ int main() { init(); /* board dependent init */ - pc.baud(115200); +// pc.baud(115200); + pc.baud(9600); printf("CC3000 ping demo. \r\n"); wifi.init(); + printf("Wifi init done. \r\n"); if (wifi.connect() == -1) { printf("Failed to connect. Please verify connection details and try again. \r\n"); } else {