GithubHelp home page GithubHelp logo

xesued / i-love-lamp Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.36 MB

Pet project using raspberry pi picos to control led strip lamps

JavaScript 1.71% HTML 3.68% TypeScript 81.50% CSS 0.63% Python 5.31% Shell 7.16%

i-love-lamp's Introduction

I Love Lamp

A pet project for creating a programmable LED strip of 60 LEDs in a vertial lamp.

Raspberry Pi Picos are used to controll the light strips. They are a thin client that receives a stream of led color values. This project includes a Node server that is the lighting engine, and communicates with the Picos. It can also accept commands from a Web client.

Using:

  • Raspbery Pi Pico
  • SK6812 RGBW LED strip

TODO:

  • Update tests in engine from vitest since it's isn't in the vite project anymore
  • Env variables for the PI and server to listen on the ips/ports I need them to

Demo Video

// Soon.

Arcitecture

flowchart TD;
    id1("Web Client");
    id2("Server");
    id3("Microcontroller")
    id1-- Sends IP of lamp and color command -->id2;
    id2-- Runs command, calculates colors, sends to correct microcontroller -->id3;

Color Engine

The engine directory contains the engine to caculate what colors to send to the microcontroller. It's a layer based system using generator functions to calculate the next 'tick' or frame.

TODO:

  • Give generater functions the actual time since last tick to mainatin better timing if there are network slowdowns or hickups.

Pi

This pi directory holds the micropython code to build a UDP client to recieve LED colors as byte data and to push it to the LED strip.

The client is very thin ATM, only taking in a byte array of LED colors to push to the LED strip. Future iterations might include having the color engine run locally, so one doesn't need a server to render animations. My inital venture into MicroPython made this difficult to achieve with desired performance.

Server

This is the server for that pushs UDP packages to the microcontrollers.

i-love-lamp's People

Contributors

xesued avatar

Watchers

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