Phant.io Connector for Arduino Ciao - Send data to Phant.io service. Phant.io is a cloud service by SparkFun
Open a secure shell
to your board and login into Linino OS.
Install it via opkg
running this commands:
$ opkg update
$ opkg install ciao-connector-phant
If you have Arduino OS installed in your
board you can use Arduino Package Manager Application.
Go to Menu -> Arduino -> Arduino Package Manger
and then search ciao-connector-phant
, select it an press Install
Download the zip file of the latest release,
unzip and move it via scp
inside you board in the desired location.
Be sure to move phant.ciao.conf.json
file into the ciao directory, eg:
$ scp ~/Downloads/ciao-connector-phant/phant.ciao.conf.json root@arduino.local:/usr/lib/python2.7/ciao/conf/
$ scp -r ~/Downloads/ciao-connector-phant/phant root@arduino.local:/root/.ciao/
Before start using the connector, set to true
the enabled
key in the phant.ciao.json.file
file.
Change the commands/start
values only if you installed the connector manually.
{
"name" : "phant",
"enabled": false,
"type" : "managed",
"core" : ">=0.1.0",
"commands": {
"start": ["/root/.ciao/phant/phant.py"],
"stop": ["/usr/bin/killall","-s", "HUP","phant.py"]
},
"implements" : {
"write" : { "direction": "out", "has_params": true }
}
}
To customize the connector to use your phant server,
please insert the correct vaules in params section of the configuration
file phant/phant.json.conf
:
...
"params" : {
"host" : "YOUR_PHANT_IP_OR_HOSTNAME",
"port" : 8080,
"base_uri" : "YOUR_BASE_URI_WITH_TRAILING_SLASH"
}
...
Else use the configuration settings for data.sparkfun.com service as follow:
...
"params" : {
"host" : "http://data.sparkfun.com",
"port" : 80,
"base_uri" : "input/"
}
...
Open Arduino IDE, import Arduino Ciao Library in your sketch and take a look at the example