Buttons and blinkenlights on a usbasp
Put the seven available GPIO's on the usbasp to use for pushbuttons and LED's via an avrcdc serial port.
Buttons report on the tty as BUTTON<1..3>=<0|1>
LED's are numbered 0..3
Help text for the tty device
use:
init
scroll=1|0
ledN=0|1
ledN=ms1[,ms2]
TODO:
Use libusb.
Basically, turn the usbasp into a self-flashable digispark type device, flashable via micronucleus. Only the atmega8 on the usbasp has real bootloader support.
WIP: Can now do eg:
while true ;do ./usbtool -v 0x16c0 -p 0x05dc -V "madsensoft.dk" -P "usbasp-buttons" -e 1 -n 3 interrupt in ; ./usbtool -v 0x16c0 -p 0x05dc -V "madsensoft.dk" -P "usbasp-buttons" -e 0 -b control in vendor endpoint 4 0 0 ;done