Sha256: 22f7dbc711a93f165fdf84fe189b9cdcd03768d170239f774b98671d766e4ac2
Contents?: true
Size: 770 Bytes
Versions: 2
Compression:
Stored size: 770 Bytes
Contents
//############################################### //------------------- Button -------------------- const BUTTON_REBOOT = 3000;; //ms MIN 50ms var button_pressed = 0;; fun checkButton= if (button2 > 0) then ( if button_pressed == 0 then ( set button_pressed = time_ms ) else if (time_ms - button_pressed) > BUTTON_REBOOT then ( buffersFill 0 4 "\255" ) ) //reboot only when button not pressed, otherwise we get into setup mode else if button_pressed > 0 then ( if (time_ms - button_pressed) > BUTTON_REBOOT then ( exit; set button_pressed = 0 ) else ( httprequest "GET" buttonPressedUrl (time_ms - button_pressed) "" #_cbHttp HTTP_NORMAL; set button_pressed = 0 ) ) ;;
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nabaztag_hack_kit-0.1.0.alpha2 | bytecode/lib/button.mtl |
nabaztag_hack_kit-0.1.0.alpha1 | bytecode/lib/button.mtl |