Coder Social home page Coder Social logo

joengelh / template-upgradable-esp Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 26.04 MB

This is a template repository that allows users to create an esp32 project including a dns and webserver, that can be used to upgrade the software remotely

License: MIT License

Makefile 49.36% C 1.61% C++ 48.12% Python 0.07% HTML 0.67% CMake 0.17%

template-upgradable-esp's Introduction

ESP32 Motor Control and Web Interface

This project demonstrates controlling a DC motor using an ESP32 microcontroller and a web interface. It is built using the PlatformIO development environment, providing a simple way to manage libraries and dependencies for your project.

Prerequisites

  • PlatformIO installed in your preferred code editor or IDE.
  • ESP32 board added to your PlatformIO environment.
  • Required libraries added to your platformio.ini file: WiFi, WiFiClient, WebServer, DNSServer, Update.

Hardware Configuration

  • Rudder Motor Control Pins:
    • motorPin1 (25): Input pin for motor channel A.
    • motorPin2 (26): Input pin for motor channel B.

WiFi Configuration

Set your WiFi SSID and Password in the following lines of the code:

const char *ssid = "your_SSID_here";
const char *password = "your_PASSWORD_here";

Web Pages

  • root.html: Root page.
  • manualControl.html: Page for manual motor control.
  • settings.html: Settings page.

Usage

  1. Open the project in your preferred PlatformIO-compatible code editor.
  2. Build and upload the code to the ESP32 board.
  3. Access the web interface using the ESP32's IP address.

Endpoints

  • /: Root endpoint.
  • /manual: Manual control endpoint.
  • /settings: Settings endpoint.
  • /update: Firmware update endpoint.

Manual Motor Control

The motor can be controlled manually through the /manualControl endpoint using POST requests with the motor parameter:

  • motor=forwards: Move the motor forwards.
  • motor=stop: Stop the motor.

Firmware Update

Firmware updates can be performed by sending a POST request to the /update endpoint with the firmware binary file. The ESP32 will automatically restart after the update.

Dependencies

Notes

  • Ensure proper hardware connections.
  • Use appropriate safety measures while handling the motor.

template-upgradable-esp's People

Contributors

joengelh avatar

Watchers

 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.