I am new to Thinger.io and it looks like a great platform to work with.
I am able to connect the Arduino MKR 1400 GSM board to thinger and control the on-board LED. My goal is to connect the Arduino MKR 1400 GSM board with the Sparkfun Ublox SAM-8Q GNSS board using I2C and be able to send GPS co-ordinates and speed to thinger platform and be able to view the data remotely.
I have a running Arduino sketch example for reading the co-ordinates and speed from the M8Q GPS module but I just don’t know how to add/connect it to the thinger platform.
Can someone please help me out and advise how this could be done ?
I would begin for defining the resource with the needed info
thing["GPS_DATA"] >> [](pson &out)
{
out["Lat"] = lat;
out["Long"] = long;
out["Speed"] = speed;
out["Acceleration"] = acceleration;
//any other value you need to upload
};
Then you can setup a bucket that retrieves the values from the device at certain frequency… or you can write the values to a bucket, I prefer the second option due I know when the device calculates the parameters, so when its done doing this, it can upload directly to the cloud.
Please check the thinger examples sketch to get familiar with that.
Note that you need to control how to upload info to the cloud, you cant upload info at the speed the microcontroller can, this will generate a huge amount of data and the server will ban the device.
For your particular case I think just defining the resources at the setup and configuring the bucket to retrieve the data would work, because the GPS library keeps estimating those values constantly.