Specifications
See for example sample SNAPpy script PWM.py.
pokeRadio(address, value) – Write to an internal radio register
The pokeRadio() function allows you to write to any location within the radio’s memory space.
On some SNAP Engines (including the Synapse RF100 SNAP Engine), the memory space for the
802.15.4 radio is not included within the memory space for the processor. The pokeRadio() function
allows you to access the internal registers of the radio hardware, regardless of how the radio is
physically accessed. (For example, on an RF100 SNAP Engine, the radio is actually connected to an
internal SPI bus).
Parameter address specifies which radio register location to write to. Parameter value specifies the
value to be written.
This function does not return a value.
This function is intended for advanced users only.
If you are not careful with this function, you could disable communications to your SNAP Engine.
Still, if you know what you are doing, peekRadio() and pokeRadio() allow you to take advantage of
additional features of the radio itself (features not supported by the “core” firmware).
print – Generate output from your script
The print capability of SNAPpy is not really a function (you don’t put parentheses characters after it,
for example), but it does let you send output from your SNAPpy scripts. Here are some examples:
print 'hello'
print 123
print xyz
You can also print multiple items from a single print statement, though unlike Python, SNAPpy does
not insert a space between printed elements:
print 'this ', 'is ', 'a ', 'test'
The result of each individual print statement will usually go on a separate line. You must use a trailing
comma (“,”) character to override this.
print 'line 1'
print 'line 2'
print 'line 3',
print ' and even more line 3'
SNAP Reference Manual Document Number 600-0007K Page 65 of 202