Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Esp8266.h
- Committer:
- tijl
- Date:
- 2019-05-13
- Revision:
- 1:63664175e603
- Child:
- 2:048e163245b7
File content as of revision 1:63664175e603:
#ifndef ESP8266_H #define ESP8266_H #include <vector> #include <string> #include "mbed.h" class Esp8266 { public: explicit Esp8266(PinName TX, PinName RX, int BaudRate, PinName ResetPin, PinName ChipSelect); void connectToAP(const char* SSID, const char* Password); std::string getRequest(const char* TCPorUDP, const char* Server, int Port, const char* ConnectionString); void setModuleMode(int Mode); std::vector<std::string> processJsonString(std::string response); private: DigitalOut *rst; DigitalOut *cs; int baud; PinName tx; PinName rx; ATCmdParser *parser; UARTSerial *serial; void setupModule(PinName TX, PinName RX, int BaudRate); void toggleResetPin(void); void closeConnection(void); std::string getJsonString(void); }; #endif