22 #define HTTP_URL "http://ack.me"
36 #include "target_config.h"
38 #include "Wiconnect.h"
49 static Serial consoleSerial(STDIO_UART_TX, STDIO_UART_RX);
56 int main(
int argc,
char **argv)
58 consoleSerial.baud(115200);
67 SerialConfig serialConfig(WICONNECT_RX_PIN, WICONNECT_TX_PIN, 256, NULL);
72 Wiconnect wiconnect(serialConfig, 256, NULL, WICONNECT_RESET_PIN);
75 wiconnect.setCommandDefaultTimeout(15000);
81 printf(
"Initializing WiConnect Library...\r\n");
86 printf(
"Failed to initialize communication with WiFi module!\r\n"
87 "Make sure the wires are connected correctly\r\n");
101 printf(
"Issuing HTTP Request: %s\r\n", HTTP_URL);
107 printf(
"Failed to issue HTTP request. Does the module have valid network credentials?\r\n");
121 fwrite(dataPtr, 1, dataLength, stdout);
128 printf(
"HTTP GET example has completed!\r\n");
Host<->Wiconnect Module serial configuration.
Connection object to remote server.
Command successfully completed.
The root WiConnect library class. This class inheriets all WiConnect functionality.