Skip to content

This program is a simple ESPNow "hello World!" for the ESP8266

Notifications You must be signed in to change notification settings

JeroPluy/ESPNow-HelloWorld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

ESPNow-HelloWorld

This program is a simple ESPNow "hello World!" for the ESP8266.
It based on two on ESP8266 – Witty Cloud Moduls and ESP-Now for the connection of both.


Table of Contents

  1. Installing Instructions
  2. Projects based on this
  3. Creater

Installing Guide

Estimated time: ~ 20 minutes

  1. Download the Arduino IDE and install it. (Install Guide)

  2. Add the needed libraries. (ESPNow-HelloWorld/Installation/..)

  3. Connect the ESP8266 that will be the server host to your PC.

    • Make sure your tool settings are correct (Port could be different)

    Settings in Tools

  4. Open the GetServerMac program in the IDE

  5. Upload the program to the ESP. (Ctrl + U)

  6. Open the serial monitor. (Ctrl + Shift + M or Tools -> Serial Monitor )

  7. Copy the AP MAC and the STA MAC from the console to the Server-Mac.txt file.
    (There should be enough time, but if you have not received a printout on the monitor, press the reset button on the ESP)

    Console Output Example:
    ===========================================================
    Gameserver
    -----------------------------------------------------------
    This node AP mac:  AF:FA:BC:02:E6:CD
    This node STA mac: AC:FA:BC:02:E6:CD
    ===========================================================
    
  8. Open the ESPNow-HelloWorld program with the Arduino IDE.

  9. Change the server Mac addresses for the targets in the code (don't just copy the entire mac.txt file)

41      // server esp mac addresses for the targets
42      #ifdef TARGET
43
44       uint8_t GAMESERVER_ap_mac[]   = {0xEE, 0xFA, 0xBC, 0x0C, 0xE6, 0xAF}; 
45       uint8_t GAMESERVER_sta_mac[]  = {0xEC, 0xFA, 0xBC, 0x0C, 0xE6, 0xAF};
46
47      // init sensor val
48      int initVal;
49
50      #endif
  1. Comment out the target mode as follows:
25    // unwanted modes should be commented out
26    #define DEBUG
27    //#define TARGET
28    #define SERVER
  1. Upload the code to the server ESP. (Ctrl + U)

  2. Connect the ESP8266 that will be the targets.

  3. Comment out the server mode as follows:

25    // unwanted modes should be commented out
26    #define DEBUG
27    #define TARGET
28    //#define SERVER
  1. Upload the program to the ESP. (Ctrl + U)

  2. Software installation completed.


Projects based on this


Creater

About

This program is a simple ESPNow "hello World!" for the ESP8266

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages