Wifi controlled robot that uses ESP8266 wifi chip.

Dependencies:   Motordriver Servo mbed-dev mbed-rtos

Fork of ESP8266_wifi_robot by Kairi Kozuma

Committer:
K2Silver
Date:
Sat Oct 29 15:35:26 2016 +0000
Revision:
0:df754b773321
Initial commit of wifi controlled robot

Who changed what in which revision?

UserRevisionLine numberNew contents of line
K2Silver 0:df754b773321 1 #ifndef ESP8266_H
K2Silver 0:df754b773321 2 #define ESP8266_H
K2Silver 0:df754b773321 3
K2Silver 0:df754b773321 4 #include "mbed.h"
K2Silver 0:df754b773321 5
K2Silver 0:df754b773321 6 #define SND_BUF_SIZE 1024
K2Silver 0:df754b773321 7
K2Silver 0:df754b773321 8 class ESP8266
K2Silver 0:df754b773321 9 {
K2Silver 0:df754b773321 10 private:
K2Silver 0:df754b773321 11 char _ssid[32];
K2Silver 0:df754b773321 12 char _pwd[32];
K2Silver 0:df754b773321 13 char _snd[SND_BUF_SIZE];
K2Silver 0:df754b773321 14 RawSerial _esp;
K2Silver 0:df754b773321 15 DigitalOut _reset;
K2Silver 0:df754b773321 16
K2Silver 0:df754b773321 17 public:
K2Silver 0:df754b773321 18 ESP8266(PinName tx, PinName rx, PinName reset, char * SSID, char * password);
K2Silver 0:df754b773321 19 void send();
K2Silver 0:df754b773321 20 void send(char * command);
K2Silver 0:df754b773321 21 void setup();
K2Silver 0:df754b773321 22 void reset();
K2Silver 0:df754b773321 23 void baud(int baudrate);
K2Silver 0:df754b773321 24 void getMAC();
K2Silver 0:df754b773321 25 void getIP();
K2Silver 0:df754b773321 26
K2Silver 0:df754b773321 27 int putc(int c);
K2Silver 0:df754b773321 28 int getc();
K2Silver 0:df754b773321 29 int readable();
K2Silver 0:df754b773321 30 int writeable();
K2Silver 0:df754b773321 31 void attach(Callback< void()> func, SerialBase::IrqType type);
K2Silver 0:df754b773321 32 };
K2Silver 0:df754b773321 33
K2Silver 0:df754b773321 34 #endif