Specifications
NOTE – The “encoding” for non-standard data rates may differ between radio manufacturers. This
means that different radio hardware may not be able to interoperate, even if set to the same (non-
standard) rate. All radios on the same frequency range set to rate 0 will be able to interoperate.
setRate(rate) – Set monitorPin() sample rate
By default, the background pin sampling that is enabled/disabled by function monitorPin() takes place
10 times a second (every 100 milliseconds). This function allows you to vary that sampling rate.
Parameter rate specifies whether the sampling should be OFF (rate =0), every 100 ms (rate = 1),
every 10 ms (rate = 2), or every 1 ms (rate = 3).
This function has no effect unless/until you are actually using pin monitoring.
This function does not return a value.
setSegments(segments) – Update seven-segment display
This function is only useful on Synapse boards that have a seven-segment (per digit) display on them.
It assumes a particular type of “shift register controlled” display, that requires continuous refresh, with
GPIO pins 13 and 14 controlling the display.
Parameter segments specifies a 16-bit binary pattern that controls which segments will be lit, and
which will be dark. Because the displays currently used do not have decimal points, only 14 of the
total 16 bits are meaningful.
A segments value of 0x0000 turns off all segments. A value of 0x7F7F corresponds to “all segments
on.”
This interface gives you complete control of the display, but you can wrap the display in higher level
access functions. See for example function display2digits() in supplied script evalBase.py.
Not all platforms have the setSegments(segments) built-in. (See the details for platform you
are using in Section 10.) For broader compatibility, consider importing synapse.sevenSegment and
using the SetSegments(segments) function instead. (Note the first letter is capitalized.)
The actual “bit to segment” assignments make sort of a “clockwise inward spiral” path around each
digit.
Refer to the following table for more details.
SNAP Reference Manual Document Number 600-0007K Page 73 of 202