Hi Phill,
With your guide example I want to perform the PC shutdown by means of a hal-pin, how could a message appear on the screen "turning off PC" wait 5 seconds and turn off, for now this is what I have ...
Code:
def user_hal_pins():
comp.newpin('turn-off-machine', hal.HAL_BIT, hal.HAL_IN)
comp.newpin('turn-off-machine.is-on', hal.HAL_BIT, hal.HAL_OUT)
comp.ready()
def user_live_update():
if bool(comp["turn-off-machine"]):
comp ["turn-off-machine.is-on"] = False
else:
os.system('systemctl poweroff')
tried with these but it just didn't work for me ..
Code:
time.sleep(5)
os.system('notify-send -t 10 -u low "turning off..."')
tkMessageBox.showinfo("turning off...", "power off")
I get errors together, if you can help me with some guidance, thank you.
Greeting
Chimeno