From bfb28a04488e7654b320b0e20236dd94bfa1a7f0 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Tue, 19 Sep 2017 15:06:52 -0400 Subject: [PATCH] Add documentation to interval --- lib/intval/Readme.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/lib/intval/Readme.md b/lib/intval/Readme.md index ebb5f4c..549eda3 100644 --- a/lib/intval/Readme.md +++ b/lib/intval/Readme.md @@ -11,6 +11,8 @@ Class representing the intval3 features * [._startFwd()](#Intval+_startFwd) * [._startBwd()](#Intval+_startBwd) * [._stop()](#Intval+_stop) + * [._watchMicro(err, val)](#Intval+_watchMicro) + * [._watchRelease(err, val)](#Intval+_watchRelease) * [.frame(dir, time, delay)](#Intval+frame) @@ -49,6 +51,38 @@ Intval._stop() - Stop motor by setting both motor pins to 0 (LOW) **Kind**: instance method of [Intval](#Intval) + + +### intval._watchMicro(err, val) +Intval._watchMicro() - +Callback for watching microswitch state changes +Using GPIO 06 on raspberry pi zero w + +**Kind**: instance method of [Intval](#Intval) + +| Param | Type | Description | +| --- | --- | --- | +| err | object | Error object present if problem reading pin | +| val | integer | Current value of the pin | + + + +### intval._watchRelease(err, val) +Intval._watchRelease() - +Callback for watching relese switch state changes +Using GPIO 05 on raspberry pi zero w +* If closed, start timer. +* If opened, check timer AND +* If time closed longer than minimum and less than `this._releaseSequence`, start frame +* If time closed longer than `this._releaseSequence`, start sequence + +**Kind**: instance method of [Intval](#Intval) + +| Param | Type | Description | +| --- | --- | --- | +| err | object | Error object present if problem reading pin | +| val | integer | Current value of the pin | + ### intval.frame(dir, time, delay)