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 details)
Built Distributions
File details
Details for the file esp8266.py-0.0.3.tar.gz
.
File metadata
- Download URL: esp8266.py-0.0.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
43b3fac91ad21b4b2c0e66306d440f54808d73f299c9ab2c63a73b0d5b8bccd2
|
|
MD5 |
64ad815cb7d5fbb6661b90f86ff728d1
|
|
BLAKE2b-256 |
41f3545104f007e5fe8e4c4efd1139387713f373307f794dddc4f96c85500f23
|
File details
Details for the file esp8266.py-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: esp8266.py-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
99e4f888eb4b4916009f7d26e21ac23b6208311e31ebcad50e2a6b4934deda1f
|
|
MD5 |
1c49096ae09b8b237d64b1862f9cc844
|
|
BLAKE2b-256 |
f78d4df671b7165f0ddda7e668a37d9ccc5821b02b44942a5f4ed5b01aca0c35
|
File details
Details for the file esp8266.py-0.0.3-py2-none-any.whl
.
File metadata
- Download URL: esp8266.py-0.0.3-py2-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3d22c1bd18367f53b0a0a70d8b1f35b78192e6deaa09a95eb8fc7cb2f501ada4
|
|
MD5 |
68f0f85e44c9b1d02016b09411bc3acc
|
|
BLAKE2b-256 |
d9c52b893d3c2b2e51da2c885adb1de497f103f57779cc7098ec1522b0a68e57
|