ESP8266 python library, a wrapper for AT commands (Hayes command set) using UART serial.
Project description
esp8266.py
ESP8266 python library, a wrapper for AT commands (Hayes command set) using UART serial. Could be running on PC/raspberry pi easily.
Dependency
- python2.7
- pySerial
Hardware wiring (Connect ESP8266-01 to RPI)
RX -> TX VCC -> 3.3v
GPIO0 RST
GPIO2 CH_PD -> 3.3v
GND -> ground TX -> RX
Usage
# initialize
# After initialization you could use the default password '11111111' to connect
# to wifi 'esp8266.py' and connect port 8080 on 192.168.4.1 through telnet/nc.
from esp8266 import ESP8266
esp01 = ESP8266(port="/dev/ttyAMA0", baudrate=115200)
# response on data receiving
@esp01.on_data
def on_data(data, link_id):
print '@@@@@@ data arrived:'
print 'link id:', link_id
print data
esp01.send("pong! \n", link_id)
# send data
esp01.send("hello world \n", '0')
TODO
- WSGI api
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
esp8266.py-0.0.2.tar.gz
(1.6 kB
view hashes)
Built Distributions
Close
Hashes for esp8266.py-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60bcda21d7f7f185428bfcd0a9877ebd97094d99276ba68c7add611a3cb31d5a |
|
MD5 | 61aa9a7f5501dae475c162d3f6a5bad8 |
|
BLAKE2b-256 | e1fe607ea86a944806d1bce74e4872ede3364053b2e6e2ffb1b9d2f9d12dfd07 |
Close
Hashes for esp8266.py-0.0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8704ee554150225af95a0fd139bc959cdff0ed155633488bb2636c9a3675a3b6 |
|
MD5 | d5858074b5361829371136f1d5c7455b |
|
BLAKE2b-256 | b4c132362f01e2fb29c0ff7690695ef6b28d4f6e62caa8a398f484ab6c969d55 |