Document intval lib logic for microswitch watcher

This commit is contained in:
mmcwilliams 2017-09-24 22:28:46 -04:00
parent 50a335af95
commit 4ec3cf422b
1 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,9 @@ Stop motor by setting both motor pins to 0 (LOW)
### intval._watchMicro(err, val) ### intval._watchMicro(err, val)
Callback for watching relese switch state changes. Callback for watching relese switch state changes.
Using GPIO 06 on Raspberry Pi Zero W. Using GPIO 06 on Raspberry Pi Zero W.
* If closed, start timer.
* If opened, check timer AND 1) If closed AND frame active, start timer, set state primed to `true`.
1) If opened AND frame active, stop frame
Microswitch + 10K ohm resistor Microswitch + 10K ohm resistor
* 1 === open * 1 === open