Skip to content

Instantly share code, notes, and snippets.

@TylerOderkirk
TylerOderkirk / tontec_console_click_hack.sh
Created July 21, 2015 02:46
Switching tmux windows on ADS7846 touch events
#!/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
@TylerOderkirk
TylerOderkirk / fake_ap.py
Created May 4, 2018 03:41
dreamproxy hg r2
# 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)