Git Product home page Git Product logo

infinitycube's Introduction

Infinity Cube Lamp

A kind of lightweight ESP32/ESP8266 webserver API and a NodeJS web UI to control an Infinity Cube built with 144 leds/m WS2812B Led Strip !

⚙️Features

  • 28 effects and 54 palettes
    • Some effects are calculated using 3D coords of the cube's edges (for maximum satisfaction)
  • Customizable effect speed and intensity
  • 3 customizable palettes
  • Simple UI with color, effect and network settings
  • Access Point and station mode - automatic failsafe AP see ApiServer
  • Ability to disable leds on the strip to avoid overheating (in my case I disabled leds behind the corner covers)
  • Possibility to rescale the brightness range
  • Controllable using integrated Joystick
  • Possibility to use an I2C 128x64 screen to monitor status (with configurable auto sleep)

📲 Quick start

Required libraries

How to

  • Upload the InfinityCube code to your ESP, it will fail to connect to WiFi and setup an AP
  • Connect to the AP with default credentials InfinityCube and 123456789
  • Access the config page at http://{ESP_IP}/setup (usually 192.168.4.1, but the IP is printed over serial)
  • Configure your Wifi settings
  • That's it, you can now access your ESP over your network

💾 Communicate without the Web UI

The API is exposed over 2 endpoints

  • http://{ESP_IP}/setup : for Wifi configuration
  • http://{ESP_IP}/api : for light control
    • GET : http://{ESP_IP}/api?palettes=0 to get the list of palettes as JSON
    {
        "Primary Color": 0,
        "Dual Colors": 1,
        "Tri Colors": 2,
        "Vintage 57": 3,
             ...
    }
    • GET : http://{ESP_IP}/api?effects=0 to get the list of effects as JSON
    {
        "Solid": 0,
        "Rainbow": 1,
        "Strobe": 2,
        "Strobe Random": 3,
             ...
    }
    • GET : http://{ESP_IP}/api?status=0 to get the current state as JSON
    {
        "effect": 0,
        "palette": 0,
        "primary_color": 16711680,
        "secondary_color": 65280,
        "tertiary_color": 255,
        "speed": 128,
        "intensity": 128,
        "brightness": 0,
        "net_ssid": "SSID",
        "net_pass": "PASS",
        "net_ip": "192.168.0.1",
        "net_gateway": "192.168.0.254",
        "net_mask": "255.255.255.0"
    }
    • POST : http://{ESP_IP}/api a POST request to that endpoint with JSON Object containing one of the following field will modify it and return the new status (same as previous request)
    {
        "effect": 0,                /* The current effect, will roll over if overflow                                       */
        "palette": 0,               /* The current palette, will roll over if overflow                                      */
        "primary_color": 16711680,  /* The primary color as a 24bit RGB value as an unsigned int                            */
        "secondary_color": 65280,   /* The secondary color as a 24bit RGB value as an unsigned int                          */
        "tertiary_color": 255,      /* The tertiary color as a 24bit RGB value as an unsigned int                           */
        "speed": 128,               /* The effect speed as an unsigned 8 bit value, will therefore roll over if > 255       */
        "intensity": 128,           /* The effect intensity as an unsigned 8 bit value, will therefore roll over if > 255   */
        "brightness": 0             /* The master brightness as an unsigned 8 bit value, will therefore roll over if > 255  */
    }

💾 Communicate using the Web UI

  • Deploy the NodeJS server
  • Change the API IP in the top right corner (or for permanent change, edit it in Api.js)
  • You can now control the leds

⚙️Integrated Screen

Legacy

Frame v2

Frame v1

Thanks

ESP :

Web UI :

Licence

Licensed under the MIT license

Disclaimer:
If you are sensitive to photosensitive epilepsy it is not recommended that you use this software.
In case you still want to try, don't use strobe, lighting or noise modes or high effect speed settings. As per the MIT license, I assume no liability for any damage to you or any other person or equipment.

infinitycube's People

Contributors

alban098 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.