GithubHelp home page GithubHelp logo

jeropluy / espnow-helloworld Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 166 KB

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

C++ 100.00%
espnow esp8266 esp8266-arduino esp espinstallation

espnow-helloworld's Introduction

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

espnow-helloworld's People

Contributors

jeropluy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.