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.3.tar.gz
(2.9 kB
view hashes)
Built Distributions
Close
Hashes for esp8266.py-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e4f888eb4b4916009f7d26e21ac23b6208311e31ebcad50e2a6b4934deda1f |
|
MD5 | 1c49096ae09b8b237d64b1862f9cc844 |
|
BLAKE2b-256 | f78d4df671b7165f0ddda7e668a37d9ccc5821b02b44942a5f4ed5b01aca0c35 |
Close
Hashes for esp8266.py-0.0.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d22c1bd18367f53b0a0a70d8b1f35b78192e6deaa09a95eb8fc7cb2f501ada4 |
|
MD5 | 68f0f85e44c9b1d02016b09411bc3acc |
|
BLAKE2b-256 | d9c52b893d3c2b2e51da2c885adb1de497f103f57779cc7098ec1522b0a68e57 |