Module to send control signals. Currently only on neonious one. Allows to send an signal with a length of up to 2 ^ 32 nanoseconds (a bit over 4 seconds) to up to 8 pins, with up to 6 defined points in time(events) when the pins can individually be turned on or off. The points in time are defined in nanoseconds, but final the resolution is 33.333... nanoseconds.
First, lowest, event
Highest possible event
If set as flag in call to send(), the signal only runs once.
If set as flag in call to send(), the signal runs in a loop till another signal is sent or clear() is called. Signal restarts after highest defined event, so in this the highest event should be the latest event.
Stops any still running signal. The callback given to send() is called.
(static) send(flags, pins, eventNanoSecs, callbackopt)
Sends the given signal. If a signal is already running, it is stopped, the callback given to send() for the last signal is called, and the new signal is sent.
||ONESHOT | RESTART||shall the signal repeat itself?|
||Array||array with one object per pin used
||Array.<Number>||array with numbers of the points in time in the unit nanoseconds of the used events. The first number is for EVENT_1, the second for EVENT_2, and so on|
||called when the signal is stopped, either because it was completed or interrupted with another signal|
Callback which is called when a signal is stopped, either because it was completed or interrupted with another signal
||optional error. If not null, the next parameters are not set|
||true, if signal completed, false if signal was interrupted|