Skip to content

Latest commit

 

History

History
85 lines (58 loc) · 2.5 KB

README.md

File metadata and controls

85 lines (58 loc) · 2.5 KB

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

Starting with version 4 of the library, RX/TX definition is directly in the sketch. 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>

/*   Snootlab device | TX | RX
               Akeru | D4 | D5
               Akene | D5 | D4
            Breakout | your pick */
#define TX 4
#define RX 5

Akeru akeru(RX, TX);

####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