Sensorian  1.0
C API Reference Guide Library
Sensorian C library for Raspberry Pi

Introduction

The following is the documentation for the Sensorian Shield userspace C library. The API provides a number of library functions that allows the users to easily integrate the onboard sensors and peripherals on their own programs.

The current firmware examples together with the code package can be downloaded from http://www.sensorian.io Several examples programs demonstrating the breadth of the API are provided. The programs were tested using Raspbian 2013 and 2014 editions on Raspberry Pi Verison1, models A, B, B+.

Sensors
The Sensorian board is divided in nine modules. Each module corresponds to a specific functionality. The modules can be used together or in standlaone mode. Kernel modules for each driver will be provided in a future release.
Dependencies

The Sensorian driver library is dependent on the BCM 2835 C library which can be found at http://www.airspayce.com/mikem/bcm2835/ To use the Sensorian C driver library follow the instructions below: First, download the library from the above link and then open a terminal and issue the following commands:

# download the latest version of the library, bcm2835-1.xx.tar.gz, then:
tar zxvf bcm2835-1.xx.tar.gz
cd bcm2835-1.xx
./configure
make
sudo make check
sudo make install
Sensorian Library Installation
Download the code packagege from the website and unzip it. Compile each example by entering
make
and execute with :
sudo ./ProgramName
Pin Numbering
The onboard sensors and peripherals are mapped to the following pins:
- Altimeter/ barometer MPL_PIN RPI_V2_GPIO_P1_07
- Ambient light LUX_PIN RPI_V2_GPIO_P1_11
- Accelerometer/ Magnetometer ACLM_PIN RPI_V2_GPIO_P1_12
- Capacitive controller ALERT_PIN RPI_V2_GPIO_P1_13
- LED LED_PIN RPI_V2_GPIO_P1_15
- RTCC MFP_PIN RPI_V2_GPIO_P1_18
SPI Pins
The SPI bus controllers is used for the TFT and SPI flash module. The Raspberry Pi GPIO pins used for the SPI peripherals are:
  • P1-24 (CE0) - TFT display
  • P1-26 (CE1) - SPI NOR flash module
I2C Pins
The Raspberry Pi GPIO pins used for I2C are:
  • P1-03 (SDA)
  • P1-05 (SLC)
GPIO PIN Function
12 0
13 1
18 0
19 1
40 0
41 1
45 1
52 0
53 1
Licensing
Sensorian code is licensed under GPL V2.

License

Contact Information

For further information, visit Sensorian.
Copyright (c) 2015 Sensorian. All rights reserved.