User manual
Transparent Data (Wireless Serial Port) ........................................................................................ 21
Scripted Serial I/O (SNAPpy STDIO) ............................................................................................... 21
The Switchboard ............................................................................................................................ 21
Loopback ................................................................................................................................. 22
Crossover ................................................................................................................................. 22
Wireless Serial ......................................................................................................................... 22
Local Terminal ......................................................................................................................... 23
Remote Terminal ..................................................................................................................... 23
Packet Serial ............................................................................................................................ 23
Debugging ...................................................................................................................................... 23
Sample Applicaon – Wireless UART ............................................................................................. 24
Opon 1 – Two Scripts, Hardcoded Addressing ...................................................................... 24
Opon 2 – One Script, Manually Configurable Addressing ..................................................... 25
Code Density ............................................................................................................................ 27
Cross-Plaorm Coding and Easy Pin Numbering ..................................................................... 27
6. Invoking Functions Remotely – Function Rpc() and Friends ....................................... 32
McastRpc(group, l, funcon, args…) ..................................................................................... 33
Rpc(address, funcon, args…) ................................................................................................. 34
Callback(callback, remoteFuncon, remoteFunconArgs ...................................................... 35
Callout(nodeAddress, callback, remoteFuncon, remoteFunconArgs…) ............................. 36
Addional Reminder ................................................................................................................ 37
7. Advanced SNAPpy Topics.......................................................................................... 38
Interfacing to external CBUS slave devices ............................................................................. 38
Interfacing to external SPI slave devices ................................................................................. 39
Interfacing to external I
2
C slave devices.................................................................................. 41
Interfacing to mul-drop RS-485 devices ................................................................................ 42
Encrypon between SNAP nodes ............................................................................................ 42
Recovering an Unresponsive Node ......................................................................................... 44
8. Example SNAPpy Scripts................................................................................................... 49
General Purpose Scripts .......................................................................................................... 49
Scripts Specific to I
2
C ............................................................................................................... 51
Scripts Specific to SPI ............................................................................................................... 52
Scripts specific to the EK2100 Kit ............................................................................................ 52
Plaorm-Specific Scripts ................................................................................................................ 52