GithubHelp home page GithubHelp logo

nopnop2002 / esp-idf-pwm-slider Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 3.0 157 KB

PWM Slider Bar Control using ESP-IDF

CMake 3.32% Makefile 0.81% HTML 8.21% C 87.66%
esp32 esp-idf web slider pwm-controller pwm

esp-idf-pwm-slider's Introduction

esp-idf-pwm-slider

Slider Bar Control using ESP-IDF.
ESP-IDF contains a lot of example code, but there is no example to create FORM on the WEB and input data from RANGE object.
This project reads value from the RANGE object on the WEB and controls LEDs and so on.
No library other than ESP-IDF is required to read the value from the WEB page.

I watched this video.

You can control these devices using your android or iphone.

  • LED Control
    led-control

  • Servo Control
    servo-control

  • RGB Control
    rgb-control

  • Digital potentiometer
    Components of the DS3502 is here.
    Components of the Three-Wire Digitally Controlled Potentiometer is here.

  • Digital Anlog Converter
    Components of the PCF8591 is here.
    Components of the MCP4725 is here.

Software requirement

ESP-IDF V4.4/V5.x.
ESP-IDF V5.0 is required when using ESP32-C2.
ESP-IDF V5.1 is required when using ESP32-C6.

WEB Page

You can change the web page.
The WEB page is stored in the html folder.

How to browse image data using built-in http server

Even if there are image files in SPIFFS, the esp-idf http server does not support this:

httpd_resp_sendstr_chunk(req, "<img src=\"/spiffs/picture.png\">");

You need to convert the image file to base64 string.

httpd_resp_sendstr_chunk(req, "<img src=\"data:image/png;base64,");
httpd_resp_sendstr_chunk(req, (char *)BASE64_ENCODE_STRING);
httpd_resp_sendstr_chunk(req, "\">");

Images in png format are stored in the image folder.
Images in base64 format are stored in the html folder.
I converted using the base64 command.

$ base64 image/ESP-LOGO.png > html/ESP-LOGO.txt

Reference

https://github.com/nopnop2002/esp-idf-web-form

esp-idf-pwm-slider's People

Contributors

nopnop2002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esp-idf-pwm-slider's Issues

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.