Created
March 24, 2013 22:48
-
-
Save MichalPekala/5233930 to your computer and use it in GitHub Desktop.
Raspberry Pi + Ruby (WiringPi) + LED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'wiringpi' | |
# run: rvmsudo ruby blink.rb | |
ledPin = 5 | |
io = WiringPi::GPIO.new | |
io.mode(ledPin, OUTPUT) | |
loop do | |
io.write(ledPin, HIGH) | |
sleep(0.5) | |
io.write(ledPin, LOW) | |
sleep(0.5) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment