GithubHelp home page GithubHelp logo

daftfox / rev-led-controller-firmware Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 16 KB

Firmware for a custom device that parses incoming characters over a serial connection and utilises FastLed to display patterns on an LED strip.

C 100.00%

rev-led-controller-firmware's Introduction

LED Controller Firmware

This project contains the code to run the REV compatible LED Controller board. The LED Controller board is a sister board that attaches to a Wemos D1 mini board sporting an ESP8266. This main board should run the latest version of the firmata firmware, which can be acquired and configured manually here, or auto-generated here.

Hardware

Requirements

This firmware is written to run on an ATTiny85 running at 8Mhz. The timing is set up with this frequency in mind.

Serial data transfer between boards

In the past I made use of SoftwareSerial and the Arduino framework to accomplish a serial connection between the main board and the LED Controller board. This was a very unstable connection, however, resulting in over 30% of the received messages being corrupted due to timing issues. To circumvent this, I have implemented a set of interrupts. Scrapping the Arduino and SoftwareSerial libraries should also reduce the program size by a fair bit, allowing me to add more LED lighting patterns.

The first interrupt will be executed as soon as a high signal is received on the receiving pin. Upon execution it will setup a timer that will buffer the incoming bits. This timer will wait the exact amount of time between the middle of the signals to ensure that the incoming bit is read correctly. The second interrupt will execute as soon at the buffer reaches 8 bits, or 1 byte, allowing me to use the value received as I see fit.

Note: the project currently contains a version of ShiftLCD that I ported to C to be able to test the serial connection for stability. It will be removed later since the project does not include a shift register or LCD screen.

FastLED

rev-led-controller-firmware's People

Contributors

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