Connect Your Thinxtra Xkit Using Sigfox

Connect Your Thinxtra Xkit Using Sigfox © CC BY-NC-SA

Learn how to build an IoT application over Sigfox integrated with Ubidots - send temp readings based on motion sensors.

  • 5 respects

Components and supplies

Apps and online services

About this project


The Thinxtra devkit Xkit boasts a full suite of features and accessories to empower anyone to develop an IoT solution. Perfect for start-ups, DIY home IoT projects, and academic research, this kit has everything you need to hit the ground running using the Sigfox's global connection network.

In this article, you will learn how to program an Thinxtra Xkit for an IoT application that takes and sends temperature readings via Sigfox, whenever motion is detected.


  • Thinxtra Xkit
  • Sigfox callback


  • Register your devkit on the Sigfox backend portal; reference to the video below to learn more and register your Thinxtra Xkit Device on Sigfox backend.
  • Download the Thinxtra repository to receive the required libraries. The libraries should be copied to the location with Arduino libraries.
  • Once the libraries are saved in the Arduino IDE, copy and paste the code below to the IDE:
  SimpleProgram.ino - Demo application for Xkit with Arduino board
  Version 1.0
  Created by Gildas Seimbille, Thinxtra Solution Pty.
  May 20, 2017.
  Using Adafruit_BMP280_Library and Adafruit_MMA8451_Library
  Copyright (c) 2012, Adafruit Industries
  Modified by Thomas Ho
  Released into the public domain.
// Include librairies
#include <WISOL.h>
#include <Tsensors.h>
#include <Wire.h>
#include <math.h>
Isigfox *Isigfox = new WISOL();
Tsensors *tSensors = new Tsensors();
// Init function
void setup() {
  // Init serial connection between Arduino and Modem
  // WISOL modem test
  // Init sensors on Thinxtra Module
  // Init an interruption on the button of the Xkit
// Infinite loop of the program
void loop() {
  float axeX = getAxeX();
  Serial.print("Check Axe X: "); Serial.println(axeX);
  if (axeX <= -0.4 or axeX >= 0.4) {
    // Get Temperature
    float temp = getTemp();
    // Send Temperature to Sigfox
    Send_Pload((const char*)&temp, sizeof(temp));
    // Wait 20s
// Return the acceleration on Axe X
float getAxeX() {
  acceleration_xyz *xyz_g;
  xyz_g = (acceleration_xyz *)malloc(sizeof(acceleration_xyz));
  float axeX = (float)xyz_g->x_g;
  return axeX;
// Get the temperature
float getTemp() {
  float temp = round(tSensors->getTemp() * 10) / 10.0;
  Serial.print("Sending Temp: "); Serial.println(temp);
  return temp;
// SendPayload Function => Send messages to the Sigfox Network
void Send_Pload(uint8_t *sendData, int len) {
  recvMsg *RecvMsg;
  RecvMsg = (recvMsg *)malloc(sizeof(recvMsg));
  Isigfox->sendPayload(sendData, len, 0, RecvMsg);
  for (int i = 0; i < RecvMsg->len; i++) {
// Button Interruption
void buttonIR(){
    float temp = getTemp();
    Send_Pload((const char*)&temp, sizeof(temp));

Next Steps

  • Next, compile the code into the Arduino UNO NOTE:  remove the Thinxtra shield to be able to compile the code properly. 
  • Connect the board to the computer, then select the Arduino UNO as board from Tools > Boards, also select the Port COM of the board from Tools > Port.
  • Verify your code in the Arduino IDE by choosing the "Check Mark" icon in the top left of the IDE. Once the code is verified, you will receive a "Done compiling" message in the Arduino IDE.
  • Upload the code into the Arduino UNO by choose the "right-arrow" icon beside the check mark icon. Once uploaded, you will receive a "Done uploading" message in the Arduino IDE.
  • Connect the Thinxtra shield with the Arduino UNO once your device is compiled and reset the board by pressing the red button on the Arduino UNO
  • The code above sends temperature value to Sigfox every time the board detects a movement. To visualize the the data sent, open the serial monitor of the Arduino IDE. You can also verify the messages via Sigfox's backend by selecting the ID of the Thinxtra device from the device list.

Next, select the "message" option from the left menu:

Set Up Callback

  • With the messages being received by Sigfox's backend, it's now time to setup a pre-configured callback to display your data with Ubidots. Reference the article below to setup an Ubidots callback and learn more about the configurations:

With the code from the article above, set the parameters below into the callback configuration to be able to handle this Sigfox data with the callback properly:

Custom payload config: temperature::float:32:little-endian

  • Type: DATA - UPLINK
  • Channel: URL
  • Url pattern:{device}/?token={Put_Your_Ubidots_TOKEN_here}
  • Use HTTP method: POST
  • Content Type: application/json
  • Body:
  "snr" : "{snr}",
  "avgSnr" : "{avgSnr}",
  "rssi" : "{rssi}",
  "temperature" : {"value":"{customData#temperature}"}

Once you've entered all the parameters required, verify your callback looks similar to that of below:


  • With the above quick steps, your device is now integrated with Ubidots and sending data whenever the the Thinxtra Xkit senses movement. To visualize your data, sign into your Ubidots account and verify the device just created with the Device ID and see and manipulate the collected data as needed.

In this tutorial we describe taking temperature readings based on movement. When other parameters are assigned into the callback body like the rssi, snr, avgSnr, and position, these too will be recorded or assigned when built by the developer.

Pro Tip: Ubidots let you modify the name of the device with a friendly one when needed, if you don't know how to modify it reference to the article below:


Now it is time to create a dashboard to control and manage the variables of your Sigfox device. To learn more about Ubidots widgets and events, check out these video tutorials.




Similar projects you might like

Sigfox To PowerBI With Thinxtra XKit And Azure EventHub

Project tutorial by Daniel Thomas

  • 1 comment
  • 3 respects

Connect your Arduino Ethernet to the Cloud

by UbiMaker

  • 9 respects
Add projectSign up / Login