Skip to content

Add go-idiomatic ESP-NOW wrappers#44

Merged
deadprogram merged 6 commits into
tinygo-org:mainfrom
sparques:esp-now-go
Jun 4, 2026
Merged

Add go-idiomatic ESP-NOW wrappers#44
deadprogram merged 6 commits into
tinygo-org:mainfrom
sparques:esp-now-go

Conversation

@sparques
Copy link
Copy Markdown
Contributor

This builds on the previous ESP-NOW work:

  • New managed ESP-NOW API: ESPNow, Peer, ESPNowAddr, peer config, broadcast support, close/deadline handling, and net.PacketConn implementation.
  • New PeerStream adapter that turns a packet peer into an io.ReadWriter, including write fragmentation.
  • ESP-NOW callbacks now fan out to both existing user handlers and the managed ESPNow router.
  • Expanded package docs with ESP-NOW managed API examples.

@sparques sparques mentioned this pull request May 29, 2026
@deadprogram
Copy link
Copy Markdown
Member

@sparques can you please rebase this branch against the latest main now that your other changes have been merged? Thanks.

@sparques
Copy link
Copy Markdown
Contributor Author

sparques commented Jun 1, 2026

@deadprogram Updated!

Comment thread doc.go
// - raw Ethernet/netdev integration
// - ESP-NOW datagram communication
//
// ESP-NOW can be used directly through the thin wrapper functions, or through
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add this as an example in examples/espnow? That should also build that example as part of the smoke tests. Also makes it a lot easier to try it and use it for things.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example added.

@deadprogram
Copy link
Copy Markdown
Member

Thank you very much for this addition @sparques now squash/merging.

@deadprogram deadprogram merged commit c7d9f94 into tinygo-org:main Jun 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants