Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cnadler86/mp_espnow_wrapper
Send and receive data between ESPs over espnow without worries
https://github.com/cnadler86/mp_espnow_wrapper
espnow micropython
Last synced: 2 days ago
JSON representation
Send and receive data between ESPs over espnow without worries
- Host: GitHub
- URL: https://github.com/cnadler86/mp_espnow_wrapper
- Owner: cnadler86
- Created: 2025-02-12T04:49:32.000Z (3 days ago)
- Default Branch: master
- Last Pushed: 2025-02-12T04:56:37.000Z (3 days ago)
- Last Synced: 2025-02-12T05:39:09.990Z (3 days ago)
- Topics: espnow, micropython
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Micropython espnow wrapper
Send and receive data between ESPs over espnow without worries. This library provides asynchronous message sending and receiving with support for chunked data transmission and acknowledgments.## Features
- Asynchronous ESP-NOW message handling
- Automatic chunking of large messages
- CRC32 verification for data integrity
- Optional acknowledgment (ACK) support
- Configurable timeout and cycle time
- Debugging mode for easier troubleshooting## Usage
### Initializing the ESPNowManager
```python
from mp_espnow_wrapper import ESPNowManageresp_manager = ESPNowManager(peer='AA:BB:CC:DD:EE:FF', debug=True)
esp_manager.set_callback('on_receive', lambda msg: print("Received:", msg))
```### Sending Messages
```python
import asyncioasync def send():
message = b'Hello ESP-NOW!'
await esp_manager.send_message(message)asyncio.run(send())
```### Receiving Messages
```python
asyncio.run(esp_manager.receive_message())
```## Configuration
- `peer`: MAC address of the target device (default: broadcast)
- `rxbuf`: Buffer size for incoming messages
- `timeout`: Message receive timeout in seconds
- `cycle_time`: Interval between message chunks (ms). In order to run stables needs to be > 2-3 ms
- `wait_msg_ack`: Whether to wait for message acknowledgment. This includes the respective on_receive callback at the receiver.
- `debug`: Enables debug output## License
This project is licensed under the MIT License.## Contribution
Feel free to submit issues or pull requests to improve the project!