No commit activity in last 3 years
No release in over 3 years
Controls an LED bar graph using a Raspberry Pi
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.1.1, ~> 0.1
 Project Readme

Introducing the rpi_led_bargraph gem

Example

require 'rpi_led_bargraph'

g = RPiLedBarGraph.new(%w(26 19 13 6 5 11 20 16 4 12))

# a quick self test
g.on
sleep 5
g.off

# using the bar graph as a progress meter, just enter a percentage
g.progress 20, :blink
sleep 2
g.progress 40, :blink

Options

Initialize options:

  • wait: defaults to 0.1s for animating the illumination of bars for methods on() and off()
  • dir: defaults to :ltr (left-to-right)
  • invert: 0% progress will illuminate all LEDs, while 100% progress would turn all the LEDs off

Progress options:

  • blink: by default it is set to false

Resources

rpi raspberrypi led bargraph gem