require 'sinatra' require './gpio' gpio = Gpio.new(1) get '/' do "Lightswitch
" end post '/' do gpio.toggle redirect '/' end