Coder Social home page Coder Social logo

sensit-sdk's Introduction

Sens'it SDK

The Sens'it is a multi-sensor device that uses the Sigfox Network to communicate.
It embeds a button, two LEDs, a temperature & relative humidity sensor, an ambient light sensor, an accelerometer, a magnetometer and a reed switch.

The Sens'it SDK makes it possible for you to change the behavior of the device to match your needs.

Getting Started

Download the SDK

Go to Sigfox Build to download the full Sens'it SDK.
Note: The GitHub repository does not contain the SDK library (required to build your firmware) & binary files.

Software Installation

To use the SDK, please install the following software:

Sens'it 2 Upgrade

The Sens'it SDK was created with the the Sens'it 3 as its main target.
If you use a Sens'it 2, follow the steps below to upgrade your device and make it compatible with the SDK.

  1. Set your Sens'it 2 on Standby/Button mode: keep the button pressed until the main LED is off and the secondary LED is on.
  2. Connect Sens'it to your computer.
  3. Do 4 short presses on the button.
  4. When the secondary LED starts blinking, do a long press on the button.
  5. If both LEDs become white, your device is in bootloader mode; otherwise go back to step 3.
  6. Run the following command to do a backup of your device memory in case of an upgrade failure:
dfu-util -a 0 -s 0x08000000:32768 -U backup.bin
  1. Program your Sens'it with the firmware upgrade.bin using the following command:
dfu-util -a 0 -s 0x08000000:leave -D bin/upgrade.bin
  1. If the main LED is:
    • BLUE, your device was already compatible with the SDK and the upgrade was not needed.
    • GREEN, the upgrade was successful.
    • YELLOW, the upgrade has failed.
    • RED, your device cannot be upgraded.
  2. To put your device back in bootloader mode, redo step 3 to 5.
  3. If the upgrade was successful you can now program your device with your custom firmware. If not, run the following command to restore your device to its initial state:
dfu-util -a 0 -s 0x08000000:leave -D backup.bin

Develop your firmware

Many functions are available to help you develop your custom application:

The API documentation is available in the full SDK archive, in the /doc/html/modules.html file.
You can also consult the F.A.Q. section, and the list of reserved prefixes that you should not use for your functions.

To start your development, use the main template.

Sample codes

Here is the list of available sample codes that may help you:

Use case Doc
Temperature & relative humidity measurement here
Ambient light measurement here
Movement detection here
Magnet detection here
AT commands parser here

How to Build

A Makefile is provided to ease the building of all sources.
You can edit the following fields to match your need:

  • TOOL_PATH: to add the path to the toolchain.
  • OUTPUT_NAME: to change the name of the firmware binary.
  • CC_INC: to add new headers directories.
  • VPATH: to add new sources directories.
  • OBJ_LIST: to add new object targets to build.
  • CC_FLAGS: to add some compilation flags.

By default, the firmware will use the Radio Configuration (RC) set in your device.
If you need another RC, use one of these flags: -DUSE_RC1, -DUSE_RC2, -DUSE_RC3, or -DUSE_RC4.
Then, use the command make to build your firmware.

The size of a Sens'it firmware can be up to 29 kB.
Do not modify the Linker Script to increase the firmware size, otherwise you may erase critical data from the device.

Program your Sens'it

To program your Sens'it you will need to put it in bootloader mode:

  1. Connect your device to your computer.
  2. Reset your device. With one of the provided firmwares, you can do this with 4 short presses on the button.
  3. When the secondary LED starts blinking, do a long press on the button.
  4. If both LEDs become white, your device is in bootloader mode.

Then, use the make prog command to program your Sens'it.

If you want to return to the original firmware of the Sens'it 3, use the following command to program it:

dfu-util -a 0 -s 0x08000000:leave -D bin/sensit_discovery_vX.X.X.bin

Replace X.X.X with the current version of the Discovery firmware available in the bin folder of the full SDK archive.

Version

  • v2.0.0

Authors

  • Sens'it Team

Copyright

  • Copyright (c) 2018 Sigfox, All Rights Reserved.

sensit-sdk's People

Contributors

feychenie avatar hlhomme avatar nestorayuso avatar xibe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.