intval3/lib/intval
mmcwilliams 52c0c6f352 Add default optional values to documentation 2017-09-19 15:20:58 -04:00
..
Readme.md Add default optional values to documentation 2017-09-19 15:20:58 -04:00
index.js Add default optional values to documentation 2017-09-19 15:20:58 -04:00

Readme.md

Intval

Class representing the intval3 features

Kind: global class

intval._declarePins()

Intval._declarePins() - (internal function) Declares all Gpio pins that will be used

Kind: instance method of Intval

intval._undeclarePins()

Intval._undeclarePins() - (internal function) Undeclares all Gpio in event of uncaught error that interupts the node process

Kind: instance method of Intval

intval._startFwd()

Intval._startFwd() - Start motor in forward direction by setting correct pins in h-bridge

Kind: instance method of Intval

intval._startBwd()

Intval._startBwd() - Start motor in backward direction by setting correct pins in h-bridge

Kind: instance method of Intval

intval._stop()

Intval._stop() - Stop motor by setting both motor pins to 0 (LOW)

Kind: instance method of Intval

intval._watchMicro(err, val)

Intval._watchMicro() - Callback for watching relese switch state changes. Using GPIO 06 on Raspberry Pi Zero W.

  • If closed, start timer.
  • If opened, check timer AND

Microswitch + 10K ohm resistor

  • 1 === open
  • 0 === closed

Kind: instance method of 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.

  1. If closed, start timer.
  2. If opened, check timer AND
  3. If press (NOW - this._state.release.time) greater than minimum and less than this._releaseSequence, start frame
  4. If press greater than this._releaseSequence, start sequence

Button + 10K ohm resistor

  • 1 === open
  • 0 === closed

Kind: instance method of 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])

Intval.frame() - Begin a single frame with set variables or defaults

Kind: instance method of Intval

Param Type Default Description
[dir] boolean "null" (optional) Direction of the frame
[time] integer "null" (optional) Exposure time, 0 = minimum
[delay] integer "null" (optional) Delay after frame before another can be started