No commit activity in last 3 years
No release in over 3 years
Simulates the rpi gem's functionality for controlling LEDs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.2, ~> 1.2
>= 0.1.3, ~> 0.1
 Project Readme

Introducing the rpi_led_simulator gem

require 'rpi_led_simulator'

# the symbol ● represents the round LED or ▋ to represent a bar LED
rpi = RPiLedSimulator.new(4, symbol: '●')

rpi.pins.first.blink duration: 3; rpi.watch

Output:

Here's a quick video, showing a virtual LED blinking for 4 seconds.

I was motivated to write this gem after experimenting with a super bright LED bar graph which wasn't good for my eyes to look at for any length of time. I could of course reduced the brightness, however that would have taken more effort in searching around for other resistors etc.

Resources

rpi led rpi_led_simulator gem