#223

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น • 212

  • @PIRATES3D
    @PIRATES3D 3 ปีที่แล้ว +5

    Rui Santos is from Portugal 😁 my country 😁 I used his tutorials in the past, it's very well explained. Great video 👍 best regards.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Tudo bem, Fernando! Ironically, it was a holiday in Portugal several years ago (when I could speak Portugues) that started my entire TH-cam venture off!

  • @canhobby6286
    @canhobby6286 3 ปีที่แล้ว +2

    Hi, Ralph - so glad to see you "discovered" ESP-NOW - as you mentioned it is a very useful and versatile light weight protocol. I believe it has been in the examples included with the ESP32 and ESP8266 board packages for quite some time now. I have used it in a project for a remote control for a fleet of smart cars based on 32s and 8266s. It is very adaptable - I use 1 transmitter to send to the various cars with a button on the remote control selecting which MAC to send to. In most of my ESP-NOW projects I use the AP mode of WiFi and assign each receiver (slave) a hard-coded MAC of my own choosing (note you need to assign odd addresses only). The ESPs allow you to have 1 MAC for STA mode and another for AP mode. This eliminates any hassles trying to get the MAC address and doing the auto discovery included in the example sketches.
    Things get to be a little more fun when combining MQTT and OTA with ESP-NOW.. I found I had to do a normal WiFi setup in STA mode and then init MQTT followed by OTA using this single WiFi init. Then I did an init of ESP-NOW using AP mode ( removing the WiFi.disconnect(); ). The examples in the boards package showed me how to make an array of the esp_now_peer_info_t slave variable.
    It is important to note that the transmitter and receiver need to be on the same WiFi channel - preferably a channel not being used by other applications such as MQTT. Here in Canada I use ch 1 for ESP-NOW.
    Amen to your comments on the IDE 2.0. It's handling of the Serial Ports in not real graceful. So for I have not seen any support for OTA uploads which is my favourite way to upload (eliminates Serial Port hassles). I actually contributed to the Arduino 2.0 project - they have their own ideas of what they want to do.
    Your idea of using an ESP-01 as a temperature sender sounds nice but left me scratching my head - I think the ESP-01 doesn't bring out the A0 pin.
    I took you recommendation re JLB PCB and did a couple of boards... (including a programmer for the ESP-01 and another for the LGT8F328P ( as well as ATmel ) based boards. Quite nice - they supported me quite well.. I installed a local router on my Linux system and was very impressed with the speed. Just recently I wanted to do some more boards and found that the integration with LCSC seems to be suffering... something about LCSC's move to a new facility which seems not to have been resolved yet.
    Anyway, Ralph - keep up the good work and Stay Healthy.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Yes, I certainly hope to using ESP-NOW for (at least) one sensor in my workshop. If it goes OK, then might expand on that.
      Oh, regarding the ESP01, I won't be using the A0 pin; if I use, for example, the DS18B20 temperature sensor, that's just a digital, one-wire interface.
      Glad you had fun with your PCB design. I still get a thrill but the devil's always in the detail. A rushed board is a scrapped board. Don't ask.

  • @200sxgrazor
    @200sxgrazor 3 ปีที่แล้ว +2

    Hi Ralph, great video, welcome to Club ESP-Now :) One of the major benefits I have experienced in using ESP-Now is the super fast boot and connect times. I have a bunch of ESP8266 based temp/humid sensor around my house that I was powering from 5v mains USB adapters. I tried using batteries but over standard wifi the quickest I could get them to connect to Wifi and send their data was about 7 seconds. This gave me a battery life of about a month at most when powering the device from a CR123A battery, even with deep sleep. By using the ESP-Now protocol my devices wake from deepsleep every 5 mins and send their data in less than 0.25 second. So far my sensors have now been running on a CR123A battery for nearly 10 months.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Yes, I agree it does boot very quickly when just using ESP-Now. In fact, I've noticed that an ESP32 can receive an ESP-NOW message even before the startup( ) code has run!

    • @zyghom
      @zyghom 2 ปีที่แล้ว +1

      when on WiFi you can make ESP to wake up and connect to AP within around 300ms or less. You just need to tweak 3 things:
      1- fixed wifi channel on both: AP and ESP
      2- fixed IP on ESP
      3- tune the wifi routine - all examples from internet show: "if not connected, delay for 1s" - I say: "delay for 20ms" - check it, it works.
      additionally: in case you want to use wifimanager these things are almost not "tweakable" but wifimanager brings other value added "thingis" ;-)

    • @zyghom
      @zyghom 2 ปีที่แล้ว

      @@RalphBacon my recent ESPnow project: hum/temp/light sensors + battery gauge, wake up, measure, send over ESPnow to the gateway, go to sleep - overall time around 150-400ms depending which sensors you use, ESPnow only takes ... 4ms including sending confirmation received from the gateway - amazing I would say. Also a plus: ESPnow apparently takes less current during sending than WiFi. Sleep current: 4.5uA

  • @dafydds
    @dafydds 3 ปีที่แล้ว +1

    I was about to embark on creating my own BLE and WiFi unified comms package/function to do exactly this... Turns out I don't need to now as this solves all my problems, this is great, thanks 👍

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Glad I could help! There's nothing new under the sun, Dav.

  • @alanmusicman3385
    @alanmusicman3385 2 ปีที่แล้ว +2

    ESP_Now is magic! I wanted to put a beacon transmitter in each of our family's cars so that, during darkness hours, the outside lights would automatically come on for 3 minutes when one of the cars arrives home. There are no street lights where we live and lots of trees which - when we have windy weather - annoyingly spuriously trigger PIR lights all the time.
    I was going to use Bluetooth and had a working beacon and receiver code set using the ArduinoBLE library - but then I found out about ESP-NOW and it seemed so much simpler than the multi-layer bluetooth approach with its connections and services and so on - much more suitable for my application.
    It worked first time and every time and connects just as fast (or perhaps even faster) than Bluetooth - and using a pair of ESP-32 WROOM boards the range is very good, the message stream from the car is received almost immediately the car is within 100 feet of the house. I did want to use an ESP-01 (8266 and tiny) for the car end of this, but I could not find a way to get ESP-Now working on 8266 using Arduino IDE (which seems a common experience) so eventually gave up and used ESP32 both ends. Very impressed with the speed reliability and range that this protocol offers.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      Your story is music to my ears, Alan (see what I did there?) Yes, ESP-NOW is almost magic. As you know, I have a few ESP32s connected to my Workshop Heater Controller (that has morphed into a web hub) from the attic (8m away) and outdoors (2m). All work very well indeed, very good range. Your application seems great!

  • @rfdave3980
    @rfdave3980 2 ปีที่แล้ว

    Ralph , excellent video. Can't wait to get started. Thanks to Rui Santos and you of course.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Have fun! I've just included another ESP-NOW sensor into my system to record the attic (loft) temperature. Worked like a dream and was very quick to do.

  • @geralltgriffiths7772
    @geralltgriffiths7772 3 ปีที่แล้ว +1

    Thanks, as ever, for providing more food for thought! I now realise that MQTT messaging would be overkill for scenarios where this is more suitable.
    I highly recommend the BME280, but it does have an Achilles' heel -- the humidity sensor in it isn't suitable for "non-condensing" (i.e. outdoor) environments. It'll fail into a mode where it says the humidity is permanently 100%. Temperature and pressure readings from it seem to be unaffected. Knowing this might just give a few more considerations for how / where to install the sensor.
    I also endorse Rui Santos' site. Lots of good stuff there. Always a good starting-point for "how do I...?" situations.
    Looking forward to your next video, of course!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Useful tip about the BME280, Gerallt, thanks! Luckily for me, if I use it, it will inside my workshop so it should be fine. But I will remember not to use outside.

  • @Chriva
    @Chriva 3 ปีที่แล้ว +1

    Welcome back, Mr. Bacon.
    Your videos are always the highlight of the day :)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      You are most kind Christian!

  • @jonathanr4242
    @jonathanr4242 3 ปีที่แล้ว +1

    Excellent. I really learned a lot from these videos. They are very interesting and very entertaining. Who needs Netflix? I tried the esp-now and it waited for the while loop to finish on the receiver before running the on_receive_call_back. I had to put my receiver routines in a sperate task to get the esp-now to be responsive without any delay.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      I'm surprised about the "delay" you mentioned. I reduced the Serial Monitor baud rate to 300bps just so I could see it all happening in sequence otherwise it was all over in a flash. Pretty much instantaneous. I suppose it might depend on what else is running in the main loop.

    • @jonathanr4242
      @jonathanr4242 3 ปีที่แล้ว

      @@RalphBacon I had the esp32 running a motor driver, with a while (time/distance) loop, and wanted to implement a wireless "stop" button. I had to put the code to run the motor driver in a separate task (which I learned about from watching your TH-cam channel) and let it check a global variable which I changed when I pushed the "stop" button. Otherwise it would wait for the while loop to finish before receiving.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +2

      Good job putting that (blocking) code into a separate task.

  • @mr.bianchirider8126
    @mr.bianchirider8126 3 ปีที่แล้ว

    I've been trying to send data between two of my ESP8266's using an API bridge. What a mess ! Thanks to Rui and you I'm going to drop that like a bad transmission and try this method !

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Have fun! It's very easy to do and works like a charm.

  • @wilfredosandovaldelgado3690
    @wilfredosandovaldelgado3690 3 ปีที่แล้ว

    Supporting others... It's great.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      My pleasure Wilfredo!

  • @neilcameron4680
    @neilcameron4680 3 ปีที่แล้ว +1

    ESP-MESH is another useful communication protocol that does not require access to the WiFi router. In practice, both ESP-NOW and ESP-MESH had a range of 250m between stations.

    • @jyvben1520
      @jyvben1520 3 ปีที่แล้ว

      big range, very useful ...

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Something else for me to look at, Neil? Right, OK!

  • @Mr31Vince
    @Mr31Vince 3 ปีที่แล้ว

    Im using ESP NOW for my diy christmas lights by having a master ESP32 running the main lights sequence and controlling 3 other ESP32s with ESP NOW comms to trigger remote sub sequences that are in time with the main sequence on the master. Works great!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Sounds great, too, Vince.
      I've now got two ESP32s communicating with my Smart Workshop Heater 'hub' and with WIFI connected too so I can use my phone to read web pages (mainly the temperature and OTA screen). ESP-NOW is an excellent tool.

  • @keldsor
    @keldsor 8 หลายเดือนก่อน

    Great video - I think that's exactly what I need for a new "add-on" to my existing "PIR and wired 🤨" burgler alarm - I'm NOT for wiring any more !

    • @RalphBacon
      @RalphBacon  8 หลายเดือนก่อน

      Yes, should work fine for that.

  • @paulstubbs7678
    @paulstubbs7678 3 ปีที่แล้ว

    Most interesting, now to integrate this to one's WiFi - I await your next instalment

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      That will come, Paul, as I have to do just that!

  • @vonries
    @vonries 3 ปีที่แล้ว

    Hi Ralph, I hope you're doing fine and keeping healthy. Keep up the good work TTYL.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Thanks, Steven, I'm fine and healthy although I did have to put the central heating on yesterday (nearly the end of August) which is unheard of in the UK normally. I bet the weather is darned sight better in the Sunshine State!

  • @fredfreund2096
    @fredfreund2096 3 ปีที่แล้ว

    Thank you for this great video!
    I see a big advantage in protecting my wifi and in case of credential change of wifi AP!
    Sensor data converted to mqtt is my aim!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Glad it was helpful!

  • @daque1960
    @daque1960 3 ปีที่แล้ว +2

    I am eager try JLCPCB because besides being cheaper per PCB their most economical shipping is far cheaper than my current supplier but I’m waiting on the world wide parts shortage to get better and let them do most of the smt assembly for me. My choice of microcontroller isn’t in stock at the moment. Thanks for all the videos! I have some 5 year old esp32’s still sealed in the bag. I was wondering (asking everyone ) will flashing the firmware fix that old security issue I read about a couple years back?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      If your "old" ESP32s are Rev 0 (you will see that message when you flash them) then they are buggy and should not be used for standard Wi-Fi projects. They might be OK for ESP-NOW, no telling. Rev 1 (and higher) is OK.
      Good luck with your (eventual) JLCPCB order, they make great boards.

  • @hopje01
    @hopje01 3 ปีที่แล้ว

    Great video. And also more secure I think, because it is not connected to the main wifi network. Outdoor 250m@300baud is a great distance!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Indeed. But you can encrypt the comms (I didn't show this as I'm not worried about sending a temperature value across the airwaves; perhaps I should be more concerned as the MAC address must be in the payload somewhere).

    • @hopje01
      @hopje01 3 ปีที่แล้ว

      The benefit, I think, is that the main wifi network cannot be accessed when the esp32 is hacked.

  • @hariseldon2577
    @hariseldon2577 3 ปีที่แล้ว +5

    As I am aging gracefully, my hearing is declining so I can no longer hear the front doorbell. So, I placed an 8266 connected to a radar unit to register someone entering my drive and send a broadcast ESP-Now message to another unit in the house on my desk. This is connected to a relay that switches a piece of LED Christmas lights to flash on and off. Never miss a delivery now. Cheap and simple. I am currently playing with a third unit, an ESP-Cam module to hear the broadcast signal and trigger it to take a picture of the drive. I can also add as many esp8266 units around my 'estate', i.e. the back garden, to act as a 'perimeter defence' against cats and squirrels that are eating my strawberries...bstards!

    • @jyvben1520
      @jyvben1520 3 ปีที่แล้ว

      need watergun ... and AI to detect squirrels ... might detect cat/dog also as ....

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Sounds like a great project, Hari. Although the cats and squirrels do need their food too. Hang on, do cats _really_ eat strawberries?

    • @hariseldon2577
      @hariseldon2577 3 ปีที่แล้ว +1

      @@RalphBacon The cats just sh1t in my seedbeds....

  • @narendraarya8761
    @narendraarya8761 3 ปีที่แล้ว

    Very good one, just a suggestion, you can use touch pin feature of the ESP32 to make project more interesting and touch control features in it. Again many thanks for your inspiring video, I learned lot you are hero.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Thanks for the tip! I've used touch controls on my Arduino projects before but never on an ESP32. I shall have to test that out.

  • @hoggif
    @hoggif 3 ปีที่แล้ว

    I think the receiver should have a state that is known unless it gets no temperature data. It could use a local sensor as a fallback or it could assume temperature is high enough or use some fixed (low) heat or whatever. Failing remote sensor should be assumed to happen and some reasonable working condition should result.
    I think esp-now is a great idea for this kind of stuff because it does not depend on wifi working or not. Thanks for another good video that can give a lot of ideas for other people too.
    I think esp-now should work along the wifi too. (never used it though). That could be usefull for example if you want OTA updates but sensor data not relying on wifi.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Yes, the ESP-NOW _does_ work with Wi-Fi, thank goodness! My project is safe! And I do have a fall-back temperature sensor inside my heater controller for the reasons you state. Can never be too careful!

  • @digihz_data
    @digihz_data 3 ปีที่แล้ว

    Hi Ralph.
    I was intrigued by this feature (ESP-NOW), so i started to test around a little bit with using more than 1 struct, and it seams to work with sending and receiving more than just 1 struct.
    Sometimes you do not want to send or recieve everything in 1 struct.
    I will post my code for 2 ESP8266 (sender and reciever based on your tx and rx code) soon if it seams to work reliably.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Thanks for sharing!

    • @melchiorrabie899
      @melchiorrabie899 2 ปีที่แล้ว

      @@RalphBacon Hi Ralph, Im ok with electronics but absolutely terrible with programming. I have a project that is very much the same as what you have shown in your video BUT needs the code changed to accommodate voltage sensing by the "Transmitter" or Initiator to use the correct terms and sending that state to a "Receiver". The "Receiver" would need to trigger a relay. Do you take on this type of work for a fee? I could provide a schematic of what I want to achieve.

  • @gazzacroy
    @gazzacroy 3 ปีที่แล้ว

    hi fella.wow that was a really good video :) i love the way you explain things was you ever a teacher???? im so pleased you took the time to have a look at this, i was blown away when i first got something working. is just so much quicker and you will see the battery last a tad longer oh and p.s. i found the range much better too. top stuff your a star.. see you soon :)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I was never a teacher (in a school) but I did some (adult colleague) training for others throughout my working life so maybe that has helped me here too. Thanks for your kind words; as I mentioned in another comment, it was your nudge that made me investigate this - thank you.

  • @pintokitkat
    @pintokitkat 3 ปีที่แล้ว +4

    Being English, I read from left to right, so it seemed odd that you'd put the receiver screen on the left ie before the transmitter. A silly thing to bug me, but it did. And then I noticed you swapped them at the end. You're trying to scramble my brain, aren't you?

    • @jyvben1520
      @jyvben1520 3 ปีที่แล้ว

      yup, had the same, when file copying/moving, left/source to right/destination

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      My brain works strangely sometimes. More often, though, it's just random placement of windows that determines what you get to see! I shall take on board what you say though, Andy, and try to get sender on the left and the receiver on the right in future. Left to right. Got it.

  • @Hasitier
    @Hasitier 3 ปีที่แล้ว

    Very interesting Ralph. Could also be used if no accesspoint is nearby (in the field or so)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      In some ways, better than an access point as no SSID or password is required. Ideal for sensors.

  • @DavidHoegen
    @DavidHoegen 3 ปีที่แล้ว +1

    ESP-NOW is cool. I even tested it with other devices [ outlet, light switch not made by me] and it responded. It doesn't have a good range < 30 feet / 9 meters. Maybe I can have all my devices check-in on each other?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Sounds interesting that other devices responded. I guess you extracted the MAC address of each device you were interrogating?

    • @DavidHoegen
      @DavidHoegen 3 ปีที่แล้ว +1

      @@RalphBacon I look at my router and found ESP-XXXX. and used the MAC. I was surprised it worked.

  • @Bob_Burton
    @Bob_Burton 3 ปีที่แล้ว +1

    Note the subtle difference in the names of the ESP-NOW libraries used by the ESP32 and ESP8266

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Until you mentioned it, I hadn't even noticed. I just used the relevant board description and it "just worked". But good that you noticed the underscore in one version but not in the other. Eagle Eyes award of the week goes to you!

  • @andymouse
    @andymouse 3 ปีที่แล้ว

    Hi Ralph, I have used the BME sensors in a couple projects now and they are great I think the BMP version is cheaper but dosent have humidity, may be wrong way round !.....cheers.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Yes, I read something like that too. As it happens I might utilise the humidity setting in a "future-future project" as it is important that my workshop does not have too much water vapour in it (during winter). I might even have to install an extractor (or just open a window... brrr).

  • @webslinger2011
    @webslinger2011 3 ปีที่แล้ว

    Hope you're doin well. Definitely a nice alternative to the nrf wifi network. Stolen/Borrowed some codes myself to get my picamera to detect motion and send me alert pics.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Sounds great! And it's definitely "borrowed" as it's all Open Source, right?

    • @webslinger2011
      @webslinger2011 3 ปีที่แล้ว

      @@RalphBacon The main python code I used was provided by (a 10 part python tutorial @_@) Alexander Baran Harper. Some other bits from Corey Shafer on how to use email with python and file management.

  • @jstro-hobbytech
    @jstro-hobbytech 3 ปีที่แล้ว

    More like Xmas 2120 Ralph. Haha. Great video brother.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Glad you liked it Joey. Oh, and Merry Xmas!

  • @arniep740
    @arniep740 3 ปีที่แล้ว

    What is the distance range over which these boards will communicate?
    Thanks for another interesting video!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Real World experiments by Rui and others state that in Open Air it's about 250m (depends on the aerial, I guess) but in the home it will be less. Not a concern for my indoor 3m (max) range required!

  • @rodneytapit5636
    @rodneytapit5636 6 หลายเดือนก่อน

    Thanks for good informative video Ralph. Is it possible to use ESP-NOW to send voice from a I2S microphone to a second ESP32?

    • @RalphBacon
      @RalphBacon  6 หลายเดือนก่อน

      No, not really. ESP-NOW is limited to a 256-byte data packet, not a continuous stream. That said, you might be able to send enough packets per second to transmit audio that is clear.

  • @gregwmanning
    @gregwmanning 3 ปีที่แล้ว

    They are called Transmitter and Receiver but both devices transmit and receive.
    It is interesting that only the "receiver" mac address is required. Maybe some sort of broadcast acknowledgement by the receiver?
    Thanks for the tutorial.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      The receiver certainly auto-acknowledges the sender's transmission, as the video shows; whether we can actually send back actual data to the sender I don't know.

  • @russellchung1794
    @russellchung1794 ปีที่แล้ว +2

    I am wondering if anyone has tried ESP NOW and ESP Rainmaker on the same ESP32 ? Could not find any info regarding that

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      Well, I'm using ESP-NOW and general Wi-Fi on the same device without issues.
      Given that ESP Rainmaker is an AIoT cloud implementation for which you'll need connectivity, I would hope (and expect) it to work. But we'll never know unless someone (hey, you busy, Russell?) tries it out!

    • @JamesWattMusic
      @JamesWattMusic ปีที่แล้ว

      Hi do you have example of ESP-NOW and WiFI. I cant get the examples I have found to work. I have ESP-Now data receiving, then I add the WiFi.begin() to the receiver board, and the data stops showing up. I comment it out, and data comes back. all on channel 6 I checked. Cant get the data to show up in wifi, only serial monitor... @@RalphBacon

  • @jyvben1520
    @jyvben1520 3 ปีที่แล้ว

    so the receiver can have a list of mac addresses (more than 1) that it can connect to ?
    which is needed if using more than 1 sensor (bme280)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      The receiver doesn't know about _any_ MAC addresses, Jyv; it's the _transmitter_ that has to know the receiver's MAC address and each transmitter can send its data to the same receiver (that's what I intend to do).

  • @veedonfleece3694
    @veedonfleece3694 3 ปีที่แล้ว

    Thanks for this!
    I wonder if the ESP-Now is completely independent of the Bluetooth? ..or e.g. is the PA shared, so that the BT would have to be suspended, if only for a short time?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      I never tested the interaction between Wi-Fi and Bluetooth in this scenario. I'd be surprised if Espressif designed it so that BT was affected in any way but empirical tests are the only way to prove that.

  • @reelrebellion7486
    @reelrebellion7486 3 ปีที่แล้ว

    a low overhead wifi based protocol. nice. loads of questions, like "how many stations?", etc. I wonder what happens if you put the mac address of, oh say, your router or other wifi device, on the receiver, the transmit a dummy packet. Do you get a response? could be used for a sort of presence detection like has been done with bluetooth beacons, but active checking not just, I haven't heard from this in a while so I'll assume it is gone".
    "Hey! Ralph, the wifi garden gnome has gone missing".

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Interesting questions that I will leave others to answer as I have enough to do just getting my Smart Heater Controller off the ground! Now, hang on, _where is_ my garden gnome?

  • @BendeVette
    @BendeVette 3 ปีที่แล้ว

    The real fun starts when you use ESP-Now to build a mesh network so you can send messages to a master through a different paths when a path is not available for a moment.
    Through a broadcast, you can tell everybody your MAC address. It will be received by everyone which is listening and in reach.

    • @jyvben1520
      @jyvben1520 3 ปีที่แล้ว

      nice to know, does that make it unsafe ? anyone can send their mac address and then send fake sensor data, would be very difficult i suppose (to know what the system expects)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      The transmission can be encrypted but whether that includes the MAC address I don't know.

    • @BendeVette
      @BendeVette 3 ปีที่แล้ว +2

      @@RalphBacon
      There seems to be a ESP-MESH too, also provided by espressif (there is also a Arduino library). It has to be save, else nobody would use it.

  • @sermadreda399
    @sermadreda399 3 ปีที่แล้ว

    Great video thank you for sharing

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Thanks for watching!

  • @awuk3468
    @awuk3468 3 ปีที่แล้ว

    Does the ESP-Now only work as master / slave or can it act as a transceiver too? It would be good to know the range indoors and outdoors with ESP-Now. Can you secure ESP-Now with a wifi type WPA protocol?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Whilst the implementation described by Rui indicates that the usual configuration is many slaves to one master (eg multiple temp/humidity sensors sending data to a hub) I'm _guessing_ that different code could be used to send stuff back to the sender... but as I don't need to do that I'll leave it to others to confirm.

  • @lint2023
    @lint2023 3 ปีที่แล้ว

    Exciting. Just to understand: ESP NOW is just code and doesn't need specific ESP's to work. Right?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Apparently so. It's just a (software) protocol that all ESP's (even ESP8266s) respond to and can understand. Exciting indeed!

  • @jhunphilipsalar2641
    @jhunphilipsalar2641 9 หลายเดือนก่อน

    I have a same issues for setting up a simple wireless water level sensor for the reciever is not giving the value input? How can i fix this?

    • @RalphBacon
      @RalphBacon  9 หลายเดือนก่อน

      You will have to describe the "same issue" so I can understand your problem better. If you mean you are transmitting a value using ESP-NOW but the receiver is printing something else, then chances are that your data type is not correct. Create a struct to hold the data (even if it's just a single integer) and use the same struct definition in the receiver too.

  • @مقاطعمترجمة-ش8ث
    @مقاطعمترجمة-ش8ث 2 ปีที่แล้ว

    11:23 I guess they are using one of ESP32 multiple timer to create that loop, it will save CPU loop time and dedicated resources to other tasks.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      That would be my assumption as well.

  • @MUHAMMADYAWARIFRAHEEM
    @MUHAMMADYAWARIFRAHEEM 3 ปีที่แล้ว

    Very informative video Sir

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Thank you, nice to see your here again Muhammad.

  • @wayne8113
    @wayne8113 3 ปีที่แล้ว

    Thanks Ralph

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      You're very welcome, Wayne!

  • @Harry-li1fx
    @Harry-li1fx 2 ปีที่แล้ว

    Can I send accelerometer data values using espnow

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Yes, you can but you do not want to flood the receiver (it runs code on each packet received).

  • @i8BBQ4Lunch
    @i8BBQ4Lunch ปีที่แล้ว

    I like your explanations. I'm new to ESP8266 and ESP-NOW and I have an issue. Starting with the Rui Santos receiver code, I:
    - Added an unsigned long variable to save the value of millis() in the Callback Function.
    - Added an if statement to evaluate (millis() - lastReceivedMillis

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      The GPIO controlling the built-in LED can vary from board to board so you might be (inadvertently) using a pin that also uses (or is impacted by) Wi-Fi, for example.
      A simple check would be to use a totally free, unused GPIO pin for the LED indicator (at least temporarily) to test out your code. Use an approx 150-ohm resistor (the GPIO pin is only 3v3 remember) and wire the anode to the pin and the other end of the resistor to GND. At least this way you can be sure your code is wrong 😆 and not the hardware!

  • @WILDMACK
    @WILDMACK 3 ปีที่แล้ว

    Hello Mr. Bacon, is it possible to use the ESP8266 to send tv remote control codes from one 8266 to one in another room? What I'm trying to do is replicate the pulses from the TV remote control from one room to control the cable box in the other room. I know you can use the 8266 to control TV's but is there a way to do it from different rooms? Thanks you so much for all the information you provide, I have learned so much from watching your channel.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      If you let the ESP8266 in one room _receive_ the TV remote signals, it can then send the required function (eg 1= vol up, 2=vol down etc) to another ESP8266 in another room using ESP-NOW, and _that_ ESP8266 then outputs the correct IR codes to the TV. Sound sensible?

    • @WILDMACK
      @WILDMACK 3 ปีที่แล้ว +1

      @@RalphBacon Thank you. I’m new to all this, but I think your saying assign a number to all the functions and that numbers gets sent to the other 8266 and then sends out the TV code. Sounds like that will work, I’ll give it a try. Thanks…

  • @whatwhatdidtheysay...lyric2373
    @whatwhatdidtheysay...lyric2373 2 ปีที่แล้ว

    Can this be used between MIXED MCU ... from ESP8266 to ESP32 and vice versa?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Indeed you can, I thought I'd demoed this in the video? Perhaps I dreamed it. But it does work.

    • @whatwhatdidtheysay...lyric2373
      @whatwhatdidtheysay...lyric2373 2 ปีที่แล้ว +1

      @@RalphBacon HAHAHA Sorry Ralph. I will watch it again. Thanks for the response!

  • @jijeshkorothpoyil2697
    @jijeshkorothpoyil2697 ปีที่แล้ว

    1.Do espnow work on AI Thinker esp boards or only on espressif ?
    2. Is there any difference in range of espnow with
    Case 1 : esp32 +esp32
    Case 2: esp8266 +esp8266
    Case 3: esp32 and esp8266

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      ESP-NOW is a proprietary comms layer, implemented by Espressif as part of their framework. So _any_ ESP32 using that framework will also be able to use ESP-NOW.
      The ESP8266 also allows this and here's a great article that show you exactly how to do it: bit.ly/espnow-esp8266

  • @MPElectronique
    @MPElectronique 3 ปีที่แล้ว

    Whats the max distance between the esp's ?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      In open air about 250m; indoors... well, far less I assume but must be about the same as you would get with standard Wi-Fi.

  • @AllanYolticGSolis
    @AllanYolticGSolis 2 ปีที่แล้ว

    Ok, anyway. I am looking for a way to send data to my computer from a ESP32 wireles, how do I do that? I see that both receiver and transmitter are connected to a computer, I guess that I need to connect the ESP32 to a battery so I can power it, but I am not sure how to get all of that done.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Your questions are quite fundamental, Allan. If you don't have much experience you need to start smaller and work up to your desired project level. There are many, many videos on this channel to help you in your quest. Good luck!

    • @AllanYolticGSolis
      @AllanYolticGSolis 2 ปีที่แล้ว

      @@RalphBacon as I searched videos about it, those didn't appear that's why I am asking here, but I found other videos which answer to my doubts. I am in a hurry to get it done

  • @mouaadhyaichi842
    @mouaadhyaichi842 2 ปีที่แล้ว

    Hi sir , how i do program ESP-NOW in one way between three nodemcu esp 8266 , master send message to Slave 1 then slave 1 send message to Slave 2

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Each ESP32 can 'listen' for ESP-NOW messages to just send the message to the corresponding slave's MAC address. It, in turn, will forward it onto the next slave using a different MAC address.

  • @kevingpearce
    @kevingpearce 7 หลายเดือนก่อน

    A great video as always Ralph. I've got a couple of unused ESP2-VROOM modules that I'd like to press into service, so I have downloaded your sketches for the ESP32 Tx and Rx.
    The Tx sketch compiled and uploaded to my board fine. But the Rx sketch will not successfully compile, and throws up the following error:
    Compilation error: invalid conversion from 'void (*)(const uint8_t*, const uint8_t*, int)' {aka 'void (*)(const unsigned char*, const unsigned char*, int)'} to 'esp_now_recv_cb_t' {aka 'void (*)(const esp_now_recv_info*, const unsigned char*, int)'} [-fpermissive]
    Why, and what does it all mean ?

    • @RalphBacon
      @RalphBacon  7 หลายเดือนก่อน

      Is that from my sketch or have you modified it? It seems to be complaining that the receive data structure is not what it is expecting. Email me the sketch if you still have issues and I can have a look much more easily than trying to do it here! (Email address is in my about page on the channel, only visible on a PC, not a phone).

    • @RalphBacon
      @RalphBacon  6 หลายเดือนก่อน

      OK, got your email and understand that downgrading the ESP framework (eg from 3.0.0 to 2.0.14) solved it for you.
      This is an ongoing problem with the new Espressif Arduino framework using the newer IDF (Espressif framework) APIs.
      OLD ESP-NOW callback function:
      void OnDataRecv(const uint8_t *mac, const uint8_t *incomingData, int len) {... your code...}
      NEW ESP-NOW (Framework 3.0) callback function:
      void onDataRecv(const esp_now_recv_info_t *info, const uint8_t *incomingData, int len) {... your code...}
      If you used to access the (old) first parameter of the sender's MAC address, you can get that now from the 'info' parameter pointer thus:
      info->src_addr
      although you will have to convert the octets into printable bytes as we always have had to.

    • @tabmaryland2333
      @tabmaryland2333 6 หลายเดือนก่อน

      @@RalphBacon Thank you both!!! I just started working with ESP-NOW and I was very frustrated with this invalid conversion error. Have a great day!

  • @qzorn4440
    @qzorn4440 3 ปีที่แล้ว

    gee whiz... i just get started on the esp-32 and now esp-now...??? while working with opencv/AI stuff... there has to be more than just setting up pcb... thanks for the great info...:)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Glad you liked it and made you appreciate the power of the ESP32!

  • @gazzacroy
    @gazzacroy 3 ปีที่แล้ว

    i tryed making a simple pager system with this and seems to be getting there.. i got 1 sender unit going and a few receivers doted about :)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Sounds great. As the instigator of this project, thanks to your comment, I thank you! I wonder why I never heard of it before?

    • @gazzacroy
      @gazzacroy 3 ปีที่แล้ว +1

      @@RalphBacon yer i only just stumbled across in the data sheet. i think they need to advertises it more , it an amazing protocol as you righty said the only draw back i can see is the 200ish bytes it can send but again this isnt a big deal just buffer it i guess. your a star :)

  • @MandoRick1978
    @MandoRick1978 2 ปีที่แล้ว

    Great info, cheers. You tried the DS18B20 probe?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Yes I have, my workshop and attic both have DS18b20 sensors wired to an ESP32 and using ESP-NOW to send the values back to my Workshop Heater Controller.
      I use the simple DS18B20 library from Rob Tillaart that only allows ONE sensor per pin:
      github.com/RobTillaart/DS18B20_RT
      because it uses less memory.
      Normally, you are able to put umpteen DS18B20 sensors on a single pin because each DS18B20 has a unique ID and you can query each one independently. I didn't need that so used the simple library instead.

  • @sciencearoundus
    @sciencearoundus 2 ปีที่แล้ว

    Is it possible to use a single esp as slave and gate way?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I'm not totally clear on your meaning here; do you mean as an ESP-NOW initiator (or responder) AND using standard Wi-Fi too? At the same time?

    • @sciencearoundus
      @sciencearoundus 2 ปีที่แล้ว +1

      @@RalphBacon Like is it possible to use esp now and wifi at the same time. Suppose we are getting the data from another esp module to a central module, can that same module can both receive and transmit the data to the cloud

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      Yes you can. That is exactly what my Smart Heater Controller does. It receives three ESP-NOW signals from various sensors but is also connected to my Wi-Fi for me to interrogate it via a web page (and it also talks to a SonOff Basic switch too). Cool, huh?

    • @sciencearoundus
      @sciencearoundus 2 ปีที่แล้ว

      @@RalphBacon yeah thats so cool can you make video on that. Many videos out there are using 2 esp's for gate way system. Actually I am working on a wsn. If you could make a video it helps me a lot. if not can you share few resources. Thank you.

    • @dunk_law
      @dunk_law 2 ปีที่แล้ว +1

      @@RalphBacon I have spent a week on this. First I secure (PMK & LMK) linked two 8266's. I tried to connect the receiver to my WIFI network to pass data as MQTT - NO GO! Then I replaced the Receiver with an ESP32, still with a secure link - STILL NO GO! yet. When I turn on WIFI_AP_STA I receive no ESPNOW packets. I have gleaned that all devices need to run on the same channel & that lower channel numbers did seem to work more reliably for one person. I am really struggling with this. Looks like MrDIY coped out and linked two modules together, one to receive ESPNOW and the other for wifi MQTT.

  • @PetRatty
    @PetRatty 3 ปีที่แล้ว +1

    Bit late to the party! Next try OTA via ESP-Now via ESP-Mesh for a device 2 miles away

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Is this a challenge, Steven? I've got to get OTA working first (using PlatformIO) then I might consider what you suggest. Might. 🤷‍♂️

  • @rajeshpanigrahi9654
    @rajeshpanigrahi9654 2 ปีที่แล้ว

    Can you give me the code for ESP8266 transmitter ?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I'm not using ESP8266 at all for ESP-NOW, always an ESP32.

    • @alanmusicman3385
      @alanmusicman3385 2 ปีที่แล้ว +1

      The claim that esp_now works on ESP32 and 8266 seems unsubstantiated. The Internet seems full of people asking how to get it working on 8266 when programming from Arduino IDE and not really getting any useful answers. In the end I gave up and used ESp32 at both ends - they are really very cheap dev boards now so not a big deal - but I still have the nagging feeling that that is what Expressif intended I should do cos the 8266 claim is not one they want to meet now; Or is that way too cynical? :-)

    • @JamesWattMusic
      @JamesWattMusic ปีที่แล้ว

      I can get the data sending from ESP-01s (ESP8266), to a ESP32. Programming ESP-01s to do that is kinda a pain. But it works. My problem is I cant get the data from ESP32 into a WiFi page. When I try to do ESP NOW + WiFI on my ESP32(receiver board) the data isnt received any more. @@alanmusicman3385

  • @georgefriday4872
    @georgefriday4872 3 ปีที่แล้ว

    Really liked this one. Could you do another please and show Arduino cloud ? I've started looking at the Arduino cloud and it looks interesting.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Hmm, I'll add it to the list!

  • @YigalBZ
    @YigalBZ 2 ปีที่แล้ว

    Thanks for the video. Questions: 1) What if the master device has no knowledge of how many slave deices are out there when waking up? Is there a away to send "who is alive" and get the MAC addresses of all alive slaves? This can prevent the need to hard code the MAC addresses. 2) is there a way to communicate from Windows/Linux to ESP-NOW device?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      You can't do what you suggest because you are doing it backwards.
      The master cannot sleep. The slaves (sensors) can, of course. But the master must remain awake to get the data at any time.
      ESP-NOW won't take unsolicited data from just any old ESP32. The MAC address ensures that the slave is an authorised one as it knows the MAC address of the _master_ (not the slave).
      I don't know of any way to communicate from Windows/Linux to ESP32 via ESP-NOW as it is an Espressif protocol - but you can just use normal Wi-Fi for that.

    • @YigalBZ
      @YigalBZ 2 ปีที่แล้ว

      @@RalphBacon I am not sure I agree. yet this is not what I meant. Let's say the whole system is waking up at the same time. Yet another slave was added since last time. Does it mean the master needs to be reprogramed?? With the new slaves' MAC address? this can be done at the lab, but not at the field. I think there is a way in which the master sends a message to "who ever is out there", and get responses. Then the master will send a specific message to each slave and get the specific answer so the master now can operate the slaves by their role.

  • @yogeshitaliya473
    @yogeshitaliya473 3 ปีที่แล้ว

    😍😍😍

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Hey, Yogesh, nice to see you here!

  • @NomenNescio99
    @NomenNescio99 3 ปีที่แล้ว

    Why did my comment about esp now got removed?

    • @colinpamplin9976
      @colinpamplin9976 3 ปีที่แล้ว

      Mine did too, strange

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      @Niklas Paulsson Nothing to do with me, honest! In fact I got notified of your original comment, and here it is:
      I've had quite a bit of issues of getting esp8266 and esp32 to talk to each others when using the esp-idf for esp32 and ESP8266_RTOS_SDK for the esp8266s and not the arduino api/sdk. In my case It seemed to boil down to wifi settings and it was definitely non trivial to debug and get it working. As long as I stuck to only esp32s and esp-idf it all worked roger-yankee-doodle-dandy. The small price increase in price for an esp32 instead of an esp8266 when setting up my esp-now based iot network now control of my home wasn't worth my time - so now I stick to esp32s exclusively and I'm happy. As alwyas, it's a work in progress, but I've got IR-diode senders, buttons, relays, sensors and range extending repeaters working together with a gw that can connect to the internet and hopefully soon will act as a mqtt gateway. If anyone is interested, see github and the username np422, all repositories named esp-now-something ...

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      @Colin Pamplin Sorry, Colin, I can't find any reference to your comment, it's not awaiting moderation or anything. TH-cam technology failing us, by the looks of it.

    • @NomenNescio99
      @NomenNescio99 3 ปีที่แล้ว

      ​@@RalphBacon It is most likely youtube's ai-algorithms that are getting overly aggressive these days when it comes to censorship.
      Nevermind, just keep it up, esp-now is a useful and interesting topic!

    • @colinpamplin9976
      @colinpamplin9976 3 ปีที่แล้ว

      @@RalphBacon I don't know whats going on with YT as I've now posted 3 times. Each time I see my comment appear then refreshing the page and it disappears. Most odd

  • @thenextproblem8001
    @thenextproblem8001 3 ปีที่แล้ว

    No Arduino time please 🥺. Can't wait to talk both network

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Hmm, I couldn't agree more.

  • @josephdaniel7890
    @josephdaniel7890 3 ปีที่แล้ว

    Hi sir please post more videos

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Will upload soon!

  • @fillempie1501
    @fillempie1501 3 ปีที่แล้ว

    hmmmm how about spoofing?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      The connections can be _encrypted_ so I'm hoping that no-one could eavesdrop on the data (or MAC address).

    • @fillempie1501
      @fillempie1501 3 ปีที่แล้ว

      @@RalphBacon Connection is encrypted, but before that
      as far as I can see is there no authentication. Every ESP32 connects to another. A pain in de ... for security folks :)

  • @dave-in-nj9393
    @dave-in-nj9393 3 ปีที่แล้ว

    what is scary is the idea that the manufacture put in a communication that is below our awareness or our control.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      True. I never realised that an ESP32 would auto-acknowledge a random ESP-NOW packet (which has the correct MAC address). Denial of service, anyone?

  • @tenminutetokyo2643
    @tenminutetokyo2643 3 ปีที่แล้ว

    DOOD!

  • @kozlovskyi
    @kozlovskyi 3 ปีที่แล้ว

    Arduino is not user friendly. Free rtos is!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +2

      I suspect (although I could be wrong) that the millions of Arduino users out there happily making stuff would disagree with you! 😂

    • @zyghom
      @zyghom 2 ปีที่แล้ว

      completely opposite: rtos is powerful but arduino is friendly ;-)

    • @MandoRick1978
      @MandoRick1978 2 ปีที่แล้ว

      Trolling like a champ.

  • @luisdelgado1517
    @luisdelgado1517 3 ปีที่แล้ว

    someone, can you help me, with the library or document.h like esp_now.h? I don't find it

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      They are part of the ESP32/ESP8266 framework. See Rui Santos' description here:
      randomnerdtutorials.com/esp-now-esp32-arduino-ide/

    • @luisdelgado1517
      @luisdelgado1517 3 ปีที่แล้ว

      @@RalphBacon thanks Ralph S Bacon
      for your helping