Tag Archives: GPS

First SigFox program with Arduino (Akeru)

Following my previous post, I’ve started to explore Sigfox capacities with a small first project. The idea was to make a low powered GPS tracker. So I’ve just added a 10€ GPS adapter from China and wrote my first sketch.
The idea is to make a simple GPS Traker, ideally not using SMS but being able to send his position from anywhere, with of course very low energy consumption. This first version is just a proof of concept so we are not yet focused on the consumption. The data are then send to the OpenSensorCloud platform (feel free to register! )


The programe is quite simple:
1. initialize everything
2. wait for the GPS to get fix position
3. send it to server through Sigfox network
4. wait 10 min
5. start at 2)

We need to wait 10 minutes before sending another 22 bytes messages, it’s a Sigfox limitation and the tradeoff between low consumption, high coverage, and size. I don’t see this as a big issue for many usage, but for sure, it will add some interesting challenges

In short:

// include the library code:
#include <Akeru.h>
#include <TinyGPS.h>
#include <SoftwareSerial.h>

// initialize the library with the numbers of the interface pins
TinyGPS gps;
SoftwareSerial ss(8, 9);  // GPS RX is set on pin 8

void setup() {

  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  Akeru.begin();  // Not sure it's neded, as I need to call it again later
  // Init modem

// int is 16 bits, float is 32 bits. All little endian
typedef struct {
  float lat;
  float lon;
  float alt;
} Payload;

void loop()
  Payload p;
  float flat, flon;

  gps.f_get_position(&flat, &flon, &age);
    // Note Seems that we need to call Akeru.begin() again or
    // further call to isReady or send will be blocked...
    Serial.println("is ready:"+String(Akeru.isReady()));
    bool status=Akeru.send(&p,sizeof(p));
    Serial.println("done result:"+String(status));
    // Wait for 10 minutes before sending another one
    for(int i=0;i<600;i++){
    Serial.println("wake up");

Of course, the program need some improvements, like waiting to have more satellite fixed before seding the first message, but let’s keep it simple.

The full source code is available

I had some minor issue, it seems that the Akeru API needs to be “reseted” before sending new data

The payload is quite simple, just a structure with three float: lat , lon, and alt (the last one might not be the most interesting but it was just a test).

The most interesting things is that now opensensorcloud support Sigfox devices. Sigfox allows you to send data in a limited way. You are allowed only 22 bytes per message, so no way to do ascii or json. So you usually send binary information, typically raw C or C++ structure. Then you have to decode them on the server.
Hopefully, OpenSensorCloud provides full support for such feature:
When creating a sensor for an Akeru enabled device, you just need to specify the format of the payload, this will be automatically converted to corresponding sensor values.

Make sure that your sigfox device id is well defined
Format are described in a generic json way, for instance, in may case, the payload contained 3 float field, so format is the following:


As I wanted to map this to a “Position” object, and not to thre sensors, I ad to add a little bit of definition


As a Sigfox callback, put the URL of the OpenSensorCloud callback, like this


Replace with the value of the platform.
OpenSensorCloud expect two extra parameters: device value, with the device_id you’ve just entered before, and data with the binary payload.

The API_KEY is visible on your profile,
And let’s go

The map location appears on the platform

You can see the result on the
Real Time Dashboard live

In next part, we will add geofencing and twitter features thanks to the Trigger functions of the OpenSensorCloud platform…

Webwag widgetize PNDs!

We just announced a few days ago a very exciting things: widgets are coming to your PNDs: Webwag Drives the First Widgets into cars and portable navigation devices.

This is interesting as a stand alone news, but also in the Webwag vision of a converging world where you can access to services around all your connected devices, from your computer, netbook, photo frame, settop box, PND or any connected devices, through a service taking advantage of devices specificites (like GPS for a PND) while taking care of device limitation.
That’s our challenge, and result if exciting for now!
And remember, see you at MWC, Hall2 , Booth 2E59

Reblog this post [with Zemanta]