Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a step by step manual for getting started with shiftr.io (desktop application), shiftr.io pocket and Processing. The goal is to collect data via shiftr.io Pocket and to store this in an .csv file.

...

Also you need to make sure that you're running the latest version of Processing. If you have an old version or haven’t Processing installed at all, get it from their website.

Afterwards, download the processing-mqtt library from the GitHub repository. When the download has finished, move the library to your sketch folders libraries directory. More information about installing a library can be found here.

...

Please choose your device by clicking on the Shiftr.io icon in your menu bar. In this example it's pocket (p11). Make sure your Bluetooth is switched on.


Wifi:
In this example, we're using Of course, you need to be connected to a network to use Shiftr.io. We can f.e. use an iPhone hotspot, so you can be more flexible and don't have to stay within the reach of the local router. Use the name and password of your wifi (for the routers it's BRIDGE / Or we simply connect to the Bridge routers (SSID: BRIDGE / Password: internet). Don't forget to press Configure.

MQTT:

Normally:

When As soon as you're connected to the internetnetwork of your choice, use the domain name of Shiftr.io in the Host field: broker.shiftr.io. The is MQTT Port is 1883 and the Client ID is the name of your connected device. Because we're using the try namespace, the Username and Password is both «try». Of course, you can use your own namespace here.

...

The Host field needs your IP-adress. Check with «alt» + click on the wifi icon in your Menu Bar. You need to have a router although it has no internet connection. In (Later in the Processing script, don't forget to change the address from borker.shiftr.io to your IP address.)

Device:
Make sure you've got the right Device Name and Base Topic. Usually Here, it's the same as your Client ID.

Parameters:
Here you You can choose which sensors should be activated. Remember that having multiple sensors active can make the battery of your battery device unload faster.

Step XX – Store data (draft)

Once you 've managed to have the sensor sending data, you can use have connected your sensor device and it's sending the collected data through shiftr.io, we can start saving that data. We want to do this through a simple Processing file.

Step 4 – Store data

Use the following Processing script to store the received data in an .csv file.

Please note: Change the URI (here: "mqtt://67edd5ec:ca0473914fbded6b@broker.shiftr.io") to the one you are connected to. And don't forget to subscribe to the right device (here: p7) with the activated sensor (here: dst).

acc – Accelometer
gyr – Gyroscope
mag – Magnometer
tmp – Temperature
hum – Humidity
prs – Pressure
dst – Distance

Please note: The script overwrites the current .csv file, if you don't change the file name (to f.e. "new-2.csv") 

...