Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

ESP-Now #226

Closed
wants to merge 4 commits into from
Closed

ESP-Now #226

wants to merge 4 commits into from

Conversation

nickzoic
Copy link
Collaborator

Support for the ESP-Now protocol, as per #197

Sample code:

import network
import esp
w = network.WLAN()
w.active(True)
esp.espnow.init()
bcast = bytes([255,255,255,255,255,255])
esp.espnow.add_peer(w, bcast)
esp.espnow.set_recv_cb(lambda x: print("RECV %s %s" % x))
esp.espnow.set_send_cb(lambda x: print("SEND %s %s" % x))
esp.espnow.send(bcast, "hello, world")

The API could probably still use some work, but this is a first stab at it.

@nickzoic nickzoic requested a review from dpgeorge November 26, 2017 10:55
@nickzoic
Copy link
Collaborator Author

This, also, should be extended to cover the ESP32 and ESP8266 ports.

@nickzoic
Copy link
Collaborator Author

(I'm going to go create this over in the main project, so closing it here)

@nickzoic nickzoic closed this Jan 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant