Coder Social home page Coder Social logo

esp-now-example's Introduction

esp-now-example

A simple example using ESP-Now on the ESP32 with Arduino

It took me a long time to get ESP-Now working, so I wanted to share a simple example to hopefully speed up the process for others. This example uses no security and simply broadcasts packets, but can be easily modified to send arbitrary data.

esp-now-example's People

Contributors

jwachlin avatar

Stargazers

 avatar  avatar lpxiao avatar DLGGmakerDIY avatar Michael Tan avatar  avatar Wahid Niam avatar Sean Stevens avatar Tomasz Walotek avatar  avatar  avatar Octav Iosif avatar Rami Abraham avatar

Watchers

 avatar  avatar

Forkers

px4ugs hammondid

esp-now-example's Issues

Brilliant Example, but "peer interface is invalid" and assignment at line 144

A ready made example to get to the point where something works is great - thank you very much

Maybe libraries have changed over the last two years, but here are two issues I found and fixed/bodged

The "peer interface is invalid" message happened in network_setup()
Fixed by moving esp_now_peer_info_t peer_info; line 141 out of the actual sketch code and inserted below line 48

Arduino compiler gave an error:
cannot convert 'esp_interface_t' to 'wifi_interface_t' in assignment. for line 144
peer_info.ifidx = ESP_IF_WIFI_STA;

Fixed by commenting it out. Not sure what that assignment was meant to do; I'll investigate later
Some hours later:
turns out at that point in the code both peer_info.ifidx & ESP_IF_WIFI_STA are zero
so no harm done there, or does someone know different?

Anyway, with those two things settled there are flashing LEDs aplenty as they casually chat amongst themselves.
Cheers and thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.