zephyr/samples/environmental_sensing
Bogdan Davidoaia 9773fdaade samples: add environmental sensing sample for Arduino 101
The ARC application collects temperature, humidity and pressure data from
a set of sensors connected to the Arduino 101 and sends it to the x86 core
through IPM. The collected data is also displayed on a Grove LCD.

The x86 application exposes the received sensor data as a simple Bluetooth
Environmental Sensing Service.

This version of the sample does not offer notifications when the sensor data
values change.

Change-Id: Iee456d5d2455c7ccb7c5923ef3c94ecb20b5cecb
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-07 16:55:38 +00:00
..
arc samples: add environmental sensing sample for Arduino 101 2016-04-07 16:55:38 +00:00
x86 samples: add environmental sensing sample for Arduino 101 2016-04-07 16:55:38 +00:00
README.txt samples: add environmental sensing sample for Arduino 101 2016-04-07 16:55:38 +00:00

README.txt

Title: Environmental Sensing

Description:

This sample is a simple environmental sensing service for the Arduino 101 board.

The ARC application collects temperature, humidity and pressure data from
a set of sensors connected to the Arduino 101 and sends it to the x86 core
through IPM. The colected sensor data is also displayed by the ARC core on
a Grove LCD.

The x86 application exposes the received sensor data as a simple Bluetooth
Environmental Sensing Service.

---------------------------------------------------------------------------------------------------

Sensor wiring:

The sample uses the HDC1008 sensor for temperature and humidity measurement, and
the BMP280 sensor for pressure measurement. This section describes how to wire
these sensors to the Arduino 101 board.

Both sensors operate at 3.3V and use I2C to comunicate with the Arduino. On the
Arduino 101, the I2C data pin (SDA) is exposed as pin A4 (on the ANALOG IN header)
and the I2C clock pin (SCL) as pin A5 (also on the ANALOG IN header). Since the
Arduino 101 doesn't have internal pull-up resitors, these need to be added externally
when connecting SCL and SDA to the sensors.

In addition to connecting the ground (GND), 3.3V power (VDD and VDDIO) and I2C
pins, both HDC1008 and BMP280 require some extra wiring.

For HDC1008, connect the address pins (A0 and A1) to GND (this sets the device
address to the default used by the app). Also connect the RDY pin of the sensor
to the A1 pin (on ANALOG IN header) of the Arduino board. This is needed as the
app configures data-ready interrupt on that pin (GPIO pin 3).

For BMP280, connect the SDO pin to GND and the CSB pin to VDDIO, since the sensor
needs to be setup to use I2C, and not SPI.

---------------------------------------------------------------------------------------------------

Internal sensor:

If you do not want to use any external sensors, you can use the Arduino 101's internal
BMI160 sensor to do just temperature readings. To do this, you need to modify the
channel_info array from the ARC application to contain only BMI160's temperature channel,
and also remove the humidity and pressure characteristic from the x86 application.

If you choose this approach and you also want to use the Grove LCD, then you also need
to modify the ARC application to only display temperature on the LCD, as humidity and
pressure values will not be available.

---------------------------------------------------------------------------------------------------

Grove LCD:

Using the Grove LCD is optional and it can be disabled by removing the Grove configuration
options from the arc/proj.conf file.

The Grove LCD communcicates with the ARC core though the I2C bus. When connecting the Grove
LCD to the Arduino 101, either directly (similar to sensor wiring) or through a Grove Base
Shield, you need to make sure that the I2C SDA and SCL lines have pull-up resistors connected
between GND and the 3.3V power source.

Take note that even though SDA and SCL are connected to a 3.3V power source, the Grove LCD
VDD line needs to be connected to the 5V power line, otherwise characters will not be displayed
on the LCD (3.3V is enough to power just the backlight).