gcc -v in a terminal to check if you need to update your compiler.
/etc/apt/sources.listin a editor and replace the name
/etc/apt/sources.listagain and replace
wheezy, after that do an update of your package list:
gcc -vat this moment, the default version is still 4.7. So we are going to change that to make the newer gcc 4.9 the default version. First remove all
gcc-vit should show version 4.9.2 or greater. You can always change the default compiler with the following command.
srcfolder. You can use any editor you want. We will use here
DEVICE_CREDENTIALwith the information you provided while registering your device in the platform. Here is an example screenshot of how the
main.cppfile should look like before editing these fields. When you are done editing the parameters, exit the nano editor pressing
Ctrl+Xand then type '
y' to save the changes.
-DRASPBERRY=ONcommandline parameter as follows -
sumresource defined in the
main.cppthat simply performs a sum. For test the device resources, please go to the API Explorer that appears in the device dashboard.
install.shscript, that will compile and install the client as a service. This step will copy a init script file to
/etc/init.d/thinger, and also will copy the compiled binary file to
/usr/local/bin/thinger. So if you want to remove the daemon client you can stop the service and remove those files.
run.shscript, which run the standalone client, both clients will be connecting to the platform and disconnecting each other continuously. If you need to stop the background client, please use this command.
sumexample is already present. You can try to define a resource for turning on and off a led, read a sensor value, execute a system command, and so on. Some tutorials will be available soon for covering this basic functionality.