Code: Select all
mpc stop
Code: Select all
mpc play 1
Any ideas on how I go about doing this?
Code: Select all
mpc stop
Code: Select all
mpc play 1
Code: Select all
Set_up_gpio
oldstate = read_gpio
while True
state = read_gpio
if state != oldstate
if state == 1
run "on" command
else
run "off" command
endif
oldstate = state
endif
sleep a bit
endwhile