Skip to content

hackables-cc/IotImagination-Fox_Library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akeru - TD1208 library for Arduino

Requirements

Akeru

or

Arduino/Genuino Uno + Akene or TD1208 Breakout

Examples

  • DemoTest : full demo sketch
    • Checks if the modem is available
    • reads temperature, supply voltage, hardware & firmware version, power level
    • sends temperature & supply voltage on Sigfox network
  • downlinkDemo : how to receive data from the Sigfox network
  • sendMultipleValues : sending various values in a single message
  • sendSingleValues : sending values from a single analog sensor

Installation

Like any other library, see tutorial

Use

####Sigfox module initialization

ARM boards do not support SoftwareSerial library, but have a few hardware serial ports available. There's a single library file to include and a simple line of code to map the signals according to your device :

#include <Akeru.h>

Akeru akeru(&Serial1); // D0+D1

Port mapping :

Serial port RX TX
Serial1 D0 D1
Serial2 D12 D10
Serial3 D5 D2

In order to use Serial2 & Serial3 you'll need to modify 2 files, see tutorial on our forum (in french).

####Powering up

A single line to add in your void setup() :

akeru.begin(); // returns 1 when everything went ok

####Enabling/Disabling echo

To see AT commands and their answers : akeru.echoOn();

To hide AT commands and their answers : akeru.echoOff();

####Sending data

Data is sent to the Sigfox network in hexadecimal format, and the payload has to be a String of all elements you want to send. To ensure proper conversion of your variables, you can use akeru.toHex() method :

int val = analogRead(0);
String valString = akeru.toHex(val);
akeru.sendPayload(varString);

Note that if you send a array of char you need to provide its size in order to convert it :

char array[] = "Hello world";
String arrayString= akeru.toHex(array, sizeof(array));
akeru.sendPayload(arrayString);

Documentation

Visit our specific forum ! Read the full documentation in french or in english.

About

Library for TD1208 Sigfox Modem, for IOT Imagintaion - FOX

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%