Reference   Language | Libraries | Comparison | Changes


Shell connector


This Connector allows to execute Shell commands for Linux side from an Arduino sketch. Below the steps that you should follow to use the File connector:

  • setup Shell connector;
  • enable the connector;
  • write a simple sketch;
  • upload the sketch and enjoy.

Setup connector

You can find File Connector configuration file at the following path: /usr/lib/python2.7/ciao/connectors/shell/shell.json.conf

 "description":"Shell connector for the Ciao Core",
 "authors":["Arduino Team <>;"],
 "params": {

The parameters at the beginning are for internal use, do NOT edit them (name, description, version, ciao) unless you know exactly what you are doing.

The configurable part is the one identified by "params" key:

  • “working_directory”: specifies the current working directory from where the command is executed.
  • “read_max_size”: specifies the max byte value that Connector can read.

Enable connector

Each Ciao connector must have a configuration file for the Ciao Core, this simple file is mandatory to enable the connector.

To enable Shell connector please edit the file at the following path: /usr/lib/python2.7/ciao/conf/shell.ciao.json.conf


The key enabled must be set to true (boolean value). This is the only parameter you are required to edit in order to enable the Shell Connector. Once done Ciao Core will be ready and configured to use Shell Connector.


#include <Ciao.h>

void setup() {
  //init Ciao
void loop() {
  //Run commands in Linino OS to get date
  CiaoData data = Ciao.write("shell", "date");
  if (!data.isEmpty()) {
    //Get data back
    String usage = data.get(2);
Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.