class Winmate::LedLightBar

Defined in:

winmate/led_light_bar.cr

Constant Summary

COLOUR_LOOKUP = {16 => Led::Red, 17 => Led::Green, 18 => Led::Blue}
COLOURS = {Led::Red => 16_u8, Led::Green => 17_u8, Led::Blue => 18_u8}
COMMANDS = {set: 97_u8, get: 96_u8}
DEFAULT_COLOURS = {"red" => {red: 255_u8, green: 0_u8, blue: 0_u8}, "green" => {red: 0_u8, green: 255_u8, blue: 0_u8}, "blue" => {red: 0_u8, green: 0_u8, blue: 255_u8}, "orange" => {red: 200_u8, green: 0_u8, blue: 0_u8}, "off" => {red: 0_u8, green: 0_u8, blue: 0_u8}}

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def colour(colour : String) #

[View source]
def connected #

[View source]
def disconnected #

[View source]
def do_poll #

[View source]
def on_load #

[View source]
def on_update #

[View source]
def query(led : Led, **options) #

[View source]
def received(bytes, task) #

[View source]
def set(led : Led, value : UInt8, **options) #

[View source]