Joining Raspberry Pi and Arduino applications with SIMPL

Internet of Things

We touched on another important feature of a SIMPL application in the first article in this series: the ability to move modules to different network nodes, including the Linode cloud. This application provides another possible dimension of relocation, because the Arduino sketch is already running on a separate node.

Figure 5 shows what it might look like if the tclSurrogate daemon on the Linode were used to connect a Rasp Pi application ( to an Arduino sketch.

Figure 5: Application running via the Linode cloud.

Because the Arduino sketch is inherently an embedded application, it would have to be reconfigured to tell it to connect to the Linode at by commenting out line 20 in Listing 1 and commenting line 21, as in:

// char *serverName = "";
// Rasp Pi host where tclSurrogate lives
char *serverName = '";

Because the module accepts a command-line parameter, it is simply a matter of rerunning it as:


We cannot overemphasize how powerful this ability is. Neither the Arduino sketch nor the Python GUI code needed any substantial change to make this happen. Such is the power of the SIMPL toolkit.


In this article, we showed how the SIMPL toolkit can be used to glue a Raspberry Pi to an Arduino and make it appear as a single SIMPL application. We discussed and illustrated another SIMPL surrogate: tclSurrogate. As with all SIMPL surrogates, the tclSurrogate fully encapsulates the networking and messaging details associated with connecting an Arduino to the Raspberry Pi. Once again, the SIMPL developer can focus energy on the business logic of the application at hand.

We also touched on a powerful feature of the modular SIMPL design: the ability to swap out modules for test stubs. This feature greatly enhances the ability to design, develop, and debug a complex application.

Finally we illustrated once again how easy it is to reconfigure SIMPL modules and spread them out into the cloud.


  1. "SIMPL Is as SIMPL Does" by Bob Findlay, Raspberry Pi GEEK, Issue 4, 2014:
  2. tclSurrogate protocol:
  3. SIMPL-Python self-installing archive for Rasp Pi:
  4. SIMPL-Arduino self-installing archive:

The Author

Bob Findlay is the facilitator for the SIMPL open source project. John Collins is one of the founding authors of the SIMPL toolkit, as well as the creator of the Python-SIMPL and Arduino-SIMPL extensions. If you like the SIMPL toolkit, feel free to communicate with us on the SIMPL project mailing list.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content