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
#!/bin/bash | |
while :; do # until forever... | |
if ! evtest --query /dev/input/event2 EV_KEY BTN_TOUCH; then # if somebody is pressing their finger on the touchscreen... | |
echo BTN_TOUCH! | |
tmux next-window -t 0 # tell un-named tmux session #0 to switch to its next window | |
sleep .1s # avoid doing this twice for a single touch | |
fi | |
sleep .05s | |
done |
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
# from https://forum.micropython.org/viewtopic.php?p=19988&sid=7aaeff853648d6cd65371661708c1fba#p19988 | |
import network | |
import time | |
import uos | |
from machine import Pin | |
led = Pin(2, Pin.OUT) | |
led.off() # actually turns it on | |
sta_if = network.WLAN(network.STA_IF) | |
sta_if.active(True) |
OlderNewer