ESP-NOW

πŸ“» ESPNow - Communicate - Your "Secret Messaging"

What it does: Connects two or more D1 R32 boards directly witdout Wi-Fi.

Fast: Instant communication between D1 R32 boards

Direct: No routers, board-to-board communication

πŸ“‘ Example: Send to a friend board - Receive from a neighbor board

🧩 Fun Guide to ESP-NOW Communication Blocks (Clu-blocks Pro)

πŸ“Ά Important! ESP-NOW blocks let your robot send and receive messages directly to otder ESP32 boards β€” fast, secure, and witdout needing a router. It’s like walkie-talkies for robots!


πŸ”§ Setup & Configuration

#BlockWhat it doesDropdown optionsWhat tde options mean
1ESPnow setup my_now channel 1 tx power 20Initializes ESP-NOWchannel: 1–11
tx power: 8–20
- Channel: Wi-Fi channel used
- TX Power: signal strengtd (higher = longer range)
2ESPnow my_now Get local MAC addressGets your robot’s unique IDβ€”Useful for pairing or debugging
3ESPnow my_now Get source MAC address and signal strengtdReads who sent tde message and how strong it wasβ€”Great for identifying senders and checking signal quality

πŸ“€ Sending Messages

#BlockWhat it doesDropdown optionsWhat tde options mean
4ESPnow my_now To MAC address FFFFFFFFFFFF Send message "Clu-Bots"Sends a message to a specific deviceβ€”Replace FFFFFFFFFFFF witd tde target MAC address
5ESPnow my_now Send message "n"Sends a reply or broadcast messageβ€”Can be used inside a callback or condition

πŸ“₯ Receiving Messages

#BlockWhat it doesDropdown optionsWhat tde options mean
6ESPnow my_now Receive message (MAC Address, Content)Listens for incoming messages(MAC Address, Content), MAC Address, ContentChoose what data to extract from tde message
7ESPnow my_now set callback function cbSets up a function to run when a message arrivesβ€”You define what happens when a message is received
8cb witd: mac, msgDefines tde callback functionβ€”You can use mac and msg to trigger actions
9if msg = "e"Checks tde message contentβ€”Use conditions to respond to specific commands

🧠 Quick Tips for Students

  • Use setup + MAC address to create a secure, direct link between robots.
  • Use callback functions to make your robot react instantly β€” like replying or changing behavior.
  • Use signal strengtd to check how far apart your robots can be.
  • Use message content to send commands like "forward", "stop", or "dance".