akhil.stanislavose@gmail.com
github.io/akhilstanislavose
Building, rebuilding, modifying, and creating software, electronic hardware, either to make it better, faster, to give it added features or to make it do something it was not originally intended to do.
~ Wikipedia
require 'wiringpi'
io = WiringPi::GPIO.new
loop do
io.write(1,HIGH)
sleep(1)
io.read(pin,LOW)
sleep(1)
end
require 'sinatra'
require 'wiringpi'
io = WiringPi::GPIO.new
LED_PIN = 1
get '/on' do
io.write(LED_PIN, HIGH)
end
get '/off' do
io.write(LED_PIN, LOW)
end
require 'wiringpi'
class Led
def initialize(pin)
@pin = pin
@io = WiringPi::GPIO.new
end
def on
@io.write(@pin, HIGH)
end
def off
@io.write(@pin, LOW)
end
end