Silica Sensor Node board sends custom ble advertising for the Gateway board

Dependencies:   X_NUCLEO_IKS01A2_SPI3W

Fork of sensor-node-ble by Roberto Spelta

Getting started with mbed SensorNode BLE

Information

History project:

  • 26/01/2017 - First Release

This project uses the Bluetooth Low Energy in order to send advertaisments every second. These payloads are read by the Visible Things Gateway board, more about it here . Every advertaisments contains sensors data read form the SensorTile and the Silica Sensor Board. For details please read the document in the MAN folder,

The application:

  • reads sensors data (accelerometer, gyroscope, lux, pressure, temperature, proximity, magnetometer)
  • send these data by BLE

You can compile this project in three ways:

1. Using the Online compiler.

Information

Learn how to use the Online compiler reading https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/online_comp/ page.

2. Using the compiler on your PC

Information

Learn how to use the mbed-cli reading https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/cli/ page.
The name of the machine is SILICA_SENSOR_NODE.

3. Exporting to 3rd party tools (IDE)

Information

Learn how to use the mbed-cli reading https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/third_party/ page. We have exported the project for you, please read here

Warning

This example requires a Visible Things Gateway board. If you don't have this board you can use RF Connect app from an Android phone just to see the raw data sent from the SensorNode.

Files at this revision

API Documentation at this revision

Comitter:
rspelta
Date:
Fri Jan 26 18:26:48 2018 +0100
Parent:
4:3791a75975d8
Commit message:
fix comments

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed_settings.pyc Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jan 26 18:21:42 2018 +0100
+++ b/main.cpp	Fri Jan 26 18:26:48 2018 +0100
@@ -27,11 +27,6 @@
 #include "SPI3W.h"
 #include "VL6180X.h"
 
-
-/* specific SensorTile serial on UART_5. To redirect STDIO_UART on UART_5 it needs to modify the baseport on PeripheralNames.h file */
-//Serial pc(PC_12, PD_2);  
-//#define printf(...) pc.printf(__VA_ARGS__)
-
 #define VERSION_SW "1.0"
 
 SPI3W sens_intf(PB_15, NC, PB_13); 						// 3W mosi, sclk on Nucleo L476 same as BTLE
@@ -182,8 +177,6 @@
 				
   acc_gyro.enable_x();
   acc_gyro.enable_g();	
-  /* Enable Free Fall Detection. */
-  //acc_gyro.enable_free_fall_detection(LSM6DSL_INT2_PIN); 	
   mag.enable();	
   acc.enable();
 	
@@ -195,7 +188,6 @@
   sensor.getIdentification(&identification);
 
   printf("LS303acc ID %x LS303mag ID %x LSM6DSL ID %x LPS22HB ID %x VL6180x ID %x\r\n", id303acc, id303mag, idLSM6, id22, identification.idModel);	  
-  printf("\r\n");  
   
   eventQueue.call_every( 500, getDataSensors );
   ble.onEventsToProcess(scheduleBleEventsProcessing);
Binary file mbed_settings.pyc has changed