Kevin Rhyne / Whiffy

Dependencies:   4DGL-uLCD-SE mbed

Committer:
kevinrhyne
Date:
Tue Oct 20 09:10:31 2015 +0000
Revision:
14:8d31d304eeb3
Parent:
13:ef68cbcb4e9a
stuyf

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kevinrhyne 11:419e5d18d42b 1 #ifndef WIFICONTROL_H
kevinrhyne 11:419e5d18d42b 2 #define WIFICONTROL_H
kevinrhyne 11:419e5d18d42b 3
kevinrhyne 10:99392075e1d0 4 #include <stdio.h>
kevinrhyne 10:99392075e1d0 5 #include "mbed.h"
kevinrhyne 14:8d31d304eeb3 6 #include <string>
kevinrhyne 10:99392075e1d0 7
kevinrhyne 12:ef988c7fe8a4 8 class WifiControl
kevinrhyne 12:ef988c7fe8a4 9 {
kevinrhyne 12:ef988c7fe8a4 10 public:
kevinrhyne 14:8d31d304eeb3 11 Serial pc;
kevinrhyne 14:8d31d304eeb3 12 Serial esp;
kevinrhyne 12:ef988c7fe8a4 13
kevinrhyne 12:ef988c7fe8a4 14 WifiControl();
kevinrhyne 14:8d31d304eeb3 15 string pollAP(); // Return buffer of access points
kevinrhyne 13:ef68cbcb4e9a 16 void getIPMAC();
kevinrhyne 13:ef68cbcb4e9a 17 void connect(char *, char *); // Connect to SSID with PWD
kevinrhyne 13:ef68cbcb4e9a 18 void ESPsetbaudrate(); // Set baud rates
kevinrhyne 13:ef68cbcb4e9a 19 void ESPconfig(); // Setup code
kevinrhyne 14:8d31d304eeb3 20 void quickConfig();
kevinrhyne 13:ef68cbcb4e9a 21 void SendCMD();
kevinrhyne 12:ef988c7fe8a4 22 void getreply();
kevinrhyne 12:ef988c7fe8a4 23
kevinrhyne 12:ef988c7fe8a4 24 private:
kevinrhyne 12:ef988c7fe8a4 25 Timer t;
kevinrhyne 12:ef988c7fe8a4 26 int count,ended,timeout;
kevinrhyne 12:ef988c7fe8a4 27
kevinrhyne 12:ef988c7fe8a4 28 char buf[1024];
kevinrhyne 12:ef988c7fe8a4 29 char snd[255];
kevinrhyne 12:ef988c7fe8a4 30
kevinrhyne 12:ef988c7fe8a4 31
kevinrhyne 10:99392075e1d0 32 };
kevinrhyne 10:99392075e1d0 33
kevinrhyne 10:99392075e1d0 34 //Serial pc(USBTX, USBRX);
kevinrhyne 10:99392075e1d0 35 //Serial esp(p28, p27); // tx, rx
kevinrhyne 11:419e5d18d42b 36 //DigitalOut reset(p26);
kevinrhyne 11:419e5d18d42b 37
kevinrhyne 11:419e5d18d42b 38
kevinrhyne 11:419e5d18d42b 39
kevinrhyne 11:419e5d18d42b 40 #endif