Skip to content

nihaltp/espnow-button-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP-NOW Remote Control Project

This project implements a wireless remote control system using ESP8266 microcontrollers and the ESP-NOW protocol. It consists of a transmitter (controller) and a receiver (robot or device being controlled).

Table of Contents

Features

  • Wireless communication using ESP-NOW protocol
  • Four-button control system
  • 8 directional movements (forward, backward, left, right, and diagonals)
  • Motor control for a two-wheeled / four-wheeled car or similar device

Hardware Requirements

  • 2 x ESP8266 boards (e.g., NodeMCU)
  • 4 x Push buttons
  • 2 x DC motors (for the receiver/car)
  • Motor Driver
  • Power supply for the motors
  • Jumper wires

Software Requirements

  • Arduino IDE
  • ESP8266 board support for Arduino IDE
  • ESP8266WiFi library
  • espnow library

Setup

  1. Install the required libraries in your Arduino IDE.
  2. Upload the transmitter.ino code to one ESP8266 board (the controller).
  3. Upload the receiver.ino code to another ESP8266 board (the robot).
  4. Connect the GND to button inputs
  5. Connect the buttons to the transmitter board according to the pin definitions in the code.
  6. Connect the motors and motor driver to the receiver board as per the pin definitions.

Configuration

Before uploading the code:

  1. In transmitter.ino, replace the receiverMAC array with the MAC address of your receiver ESP8266.
  2. In receiver.ino, adjust the MOTOR_DRIVER variable to match your motor driver type.
  3. Adjust the SERIAL_PORT boolean in both files if you want to enable/disable serial debugging.

Usage

  1. Power on both the transmitter and receiver.
  2. Press the buttons on the transmitter to control the movement of the receiver (robot).
  3. The receiver will interpret the button presses and control the motors accordingly.

Circuit Diagram

Example Transmitter Circuit Example L298N Receiver Circuit Example BTS Receiver Circuit

Troubleshooting

  • Ensure both devices are powered and within range of each other.
  • Check that the MAC address in the transmitter code matches the receiver's MAC address.
  • Verify all connections if the motors are not responding as expected.
  • Make sure GND is provided to Buttons

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages