Giter VIP home page Giter VIP logo

antichoker's Introduction

AntiChoker

A tiny hardware project for Festiwal Światła - a choker with a LED strip displaying air quality (aka a choker showing when you are going to choke)

AntiChoker

Hardware

  • ESP32. XIAO ESP32S3 was used, but any similar chip should work. Consider using a chip with integrated Stemma QT connector (like Adafruit QT Py RP2040) to avoid unnecessary soldering. Processes air quality and displays it on the LED strip (also sends over MQTT if needed)
  • Adafruit SGP40 Air Quality Sensor Breakout. Monitors air quality and gives it out in [0-500] range
  • Any suitable LED strip (1 LED/cm is preferrable)
  • An actual choker to attach the stip. This can potentially hold just on the led strip, but having a choker gives control over the length and a decent base
  • Powered via powerbank, but possible to solder a battery (if 3V pin is used for LEDs)

Connection

  • Connect SGP40 to ESP32 via Stemma QT cable (SDA, SCL, GND, 3V)
  • Connect LEDs to ESP32 (data pin, GND, 5V)

Software

Built with PlatformIO and VSCode. Most logic are in leds_controller.cpp. Sensor fetching and LEDs update are done on separate cores, as sensor takes ~100-200ms to get the data, which is not suitable for smooth LED animation. It is also able to send measurtement data over MQTT ()

Setup

  • If you don't need MQTT - use no_mqtt env
  • Set DATA_PIN in leds_controller.cpp (TODO: pass from env?)
  • For MQTT use production env
    • Copy secrets.ini.example into secrets.ini and set appropriate values for WiFi and MQTT connections

Visuals

Animation is basically:

  • Air quality converted to color via color palette
  • Color is set to the whole LED strip, with brightness adjusted as a moving sine-wave (with some gamma corrections)

antichoker's People

Contributors

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