Git Product home page Git Product logo

self-organising-leds's Introduction

ko-fi

Self Organising LEDs

Demo Video

And the latest demo on the Christmas tree:

Demo Video

This project uses an esp32 board to drive a string of WS2118 LEDs. It uses some basic image processing to detect where the LEDs are so that you can display geometric patterns even if the LEDs are not arranged in a grid.

If you have an espcam then you can just follow the instructions on the Setup section. On first boot the espcam will try and calibrate the LED positions.

Once calibrated these are stored in nvram. If you need to recalibrate just navigate to the web interface: http://espcam.local and hit the calibrate button.

If you do not have an ESP-CAM and want to use your phone for calibration then you will need to jump through some hoops.

You cannot access the phone's camera unless you are using https - currently the webserver that I am using only supports http.

To get an https connection I would suggest using ngrok - https://ngrok.com/.

You can create an https tunnel on your computer to the esp32 device. I would recommend using the ip address.

Do something like:

ping espcam.local

And take a note of the ip-address. Then do:

ngrok http IP_ADDRESS

This will create an https endpoint in the cloud that you can use to access the esp32 securely.

You will need a steady hand or a tripod as the calibration takes about 20-30 seconds depending on how many LEDs you have.

Setup

You will need python3, node and yarn installed.

Create a virtual environment, activate it and install the requirements using:

python3 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt

Create a file WifiCredentials.h in the firmware/src and populate it with your wifi SSID and PASSWORD:

#define SSID "<SSID>"
#define PASSWORD "<PASSWORD>"

In main.cpp update the defines for the number of LEDs you have and if you have an ESP-CAM or a normal ESP32 board.

#define LED_COUNT 100
#define CAMERA_ENABLED 1

You can now use the Makefile to build the firmware, frontend and upload them to your device.

make upload

self-organising-leds's People

Contributors

cgreening avatar dependabot[bot] avatar joeboyc2 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.