GithubHelp home page GithubHelp logo

chorus-led-gate's Introduction

Led Gate Module for Chorus Laptimer

This is an add-in hardware for the Chorus Laptimer device.

It allows you to light up the moment when a racing drone passes the finish gate. Each VTX channel has its own color, so spectators can easily see which pilot makes the lap, like this (click to watch video):

Chorus LED Gate Video

How it works

The module listens to the UART data traffic from Chorus nodes and therefore "knows" when a heat is started/finished and when any node detects a new lap. So whenever a new lap is detected in the race mode, the LEDs are lit with a color corresponding to the number of the Chorus node which reported the lap.

The module introduces its own extension for Chorus API (commands starting with "T").

Attachment to Chorus

The module doesn't issue commands, just listens to them. This makes it possible to connect it in parallel with Chorus UART Tx line. Schematically it should look like this:

Chorus nodes:N1 -> N2 -> ... Nn +-->  Bluetooth/WiFi Dongle
                                | 
                                | (2 wires: Gnd & Tx)
                                |
                                +--> LED Gate module -> LED strips

Flashing:

Flash first arduino with chorus_led_module.ino

Flash subsequent modules with WS2812-driver.ino

Commands for Chorus to drive the Led Module:

Generic:

Description Command Example
Prepare to countdown TP none
Countdown 3 T3 none
Countdown 2 T2 none
Countdown 1 T1 none
Start race R*R1 (or R*R2) none
End race R*R0 none
Lap Racer #0 S0Lxyyyyyyyy none
Lap Racer #1 S1Lxyyyyyyyy none
Lap Racer #2 S2Lxyyyyyyyy none
Lap Racer #3 S3Lxyyyyyyyy none
... ... none
Lap Racer #7 S7Lxyyyyyyyy none
Start calibration R*H1 (or S<module>H1) none
Calibration stage 2 S<module>H2 none
Calibration end S<module>H0 none
Set modules count (for calibration and showing color assignments) TN<modules_count> none

Setting colors:

These commands store the selected matching of colors to Chorus nodes in Arduino EEPROMs, so once set - the colors are saved for subsequent usage.

Possible Color indices:

  • 0 - Red
  • 1 - Yellow
  • 2 - Green
  • 3 - Blue
  • 4 - Orange
  • 5 - Aqua
  • 6 - Purple
  • 7 - Pink
Description Command Example
Show color assignments TS
Set Color for #0 TC0<color_index> TC03 - blue on node #0
Set Color for #1 TC1<color_index> TC12 - green on node #1
Set Color for #2 TC2<color_index> TC21 - yellow on node #
Set Color for #3 TC3<color_index> TC30 - red on node #3
... ... ...
Set Color for #7 TC7<color_index> TC75 - aqua on node #7

chorus-led-gate's People

Contributors

voroshkov avatar

Stargazers

 avatar

Watchers

James Cloos 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.