Kevin Rhyne / Whiffy

Dependencies:   4DGL-uLCD-SE mbed

Committer:
kevinrhyne
Date:
Mon Oct 19 22:25:18 2015 +0000
Revision:
13:ef68cbcb4e9a
Parent:
12:ef988c7fe8a4
Child:
14:8d31d304eeb3
wifi char passing

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 10:99392075e1d0 6
kevinrhyne 12:ef988c7fe8a4 7 class WifiControl
kevinrhyne 12:ef988c7fe8a4 8 {
kevinrhyne 12:ef988c7fe8a4 9 public:
kevinrhyne 12:ef988c7fe8a4 10 Serial *pc;
kevinrhyne 12:ef988c7fe8a4 11 Serial *esp;
kevinrhyne 12:ef988c7fe8a4 12
kevinrhyne 12:ef988c7fe8a4 13 WifiControl();
kevinrhyne 13:ef68cbcb4e9a 14 void pollAP(char *); // Return buffer of access points
kevinrhyne 13:ef68cbcb4e9a 15 void getIPMAC();
kevinrhyne 13:ef68cbcb4e9a 16 void connect(char *, char *); // Connect to SSID with PWD
kevinrhyne 13:ef68cbcb4e9a 17 void ESPsetbaudrate(); // Set baud rates
kevinrhyne 13:ef68cbcb4e9a 18 void ESPconfig(); // Setup code
kevinrhyne 13:ef68cbcb4e9a 19 void SendCMD();
kevinrhyne 12:ef988c7fe8a4 20 void getreply();
kevinrhyne 12:ef988c7fe8a4 21
kevinrhyne 12:ef988c7fe8a4 22 private:
kevinrhyne 12:ef988c7fe8a4 23 Timer t;
kevinrhyne 12:ef988c7fe8a4 24 int count,ended,timeout;
kevinrhyne 12:ef988c7fe8a4 25
kevinrhyne 12:ef988c7fe8a4 26 char buf[1024];
kevinrhyne 12:ef988c7fe8a4 27 char snd[255];
kevinrhyne 12:ef988c7fe8a4 28
kevinrhyne 12:ef988c7fe8a4 29
kevinrhyne 10:99392075e1d0 30 };
kevinrhyne 10:99392075e1d0 31
kevinrhyne 10:99392075e1d0 32 //Serial pc(USBTX, USBRX);
kevinrhyne 10:99392075e1d0 33 //Serial esp(p28, p27); // tx, rx
kevinrhyne 11:419e5d18d42b 34 //DigitalOut reset(p26);
kevinrhyne 11:419e5d18d42b 35
kevinrhyne 11:419e5d18d42b 36
kevinrhyne 11:419e5d18d42b 37
kevinrhyne 11:419e5d18d42b 38 #endif