Giter Site home page Giter Site logo

master-dimmer's Introduction

master-dimmer

The ESP8266 sends PWMs to control led strips, either using wifi or serial commands.

The code works (although no wifi, but i might have fried that because it should).

It currently only controls one led strip on the D7 pin, and applies the state, brightness, and transition time parameters specified in JSON format.

Make sure to change the default values in settings.h .

Json examples:

{ "state": "ON" }

{ "state": "ON" , "brightness": 600}

{ "state": "ON" "brightness": 600, "transition" : { "preset": "AUTO" }}

{ "state": "ON" "transition" : { "preset": "CLOCK", "TimeMs": 2000 }}

{ "state": "ON" "brightness": 600, "transition" : { "preset": "CLOCK", "TimeMs": 2000 }}

This is my first github project and more an experiment than something else, so please be patient and show forgiveness :)

The code was first based on @corbanmailloux work (https://github.com/corbanmailloux/esp-mqtt-rgb-led), but i only kept the wifi part in the end.

TODO:

  • Apply coding rules
  • Add light sensor code (sensor connected on the analog input)
  • Add ntp clock usage
  • Add pattern code
  • update JSON commands for other lamps

Warning

Do NOT try to connect your led strip on D7, you need a mosfet that can work with 3.3V level, or any kind of mosfet driver that will take that voltage level.

I will publish the schematics when i have tested it enough. For now it seems to work pretty well and does not heat, but be extra careful when assembling and trying it; remember this circuit can command tens of amps, which can easily start a fire. If your AC/DC converter is badly wired, it could also kill you, so if you do not know for sure what you are doing, please ask someone who does to do the assembling and testing for you.

Your mileage may vary, i will not take any responsibility if you end up frying something.

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.