Introduction: Sensor Data Fusion
This introductory Instructable is all about the acquisition of various sensor data available on the grove starter kit plus that comes with the intel IoT developer kit.
Here we are going to use the following sensors available-
- Sound sensor
- Rotary angle sensor
- Touch sensor
The data absorbed from here will be displayed on the Grove RGB LCD.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Connecting the Sensors and the LCD
In this step, we will attach all the hardware components to the Edison. In the Grove starter kit plus, we have a Grove base shield. This base shield will be used for the Edison connections. For the above sensors that are to be used, sound sensor and rotary angle sensor have analog values as output. The touch sensor is used with digital pins. The LCD follows the I2C protocol. The values obtained from the sensor are displayed in the LCD. The image shown above shows the completed structure.
Step 2: Code
#define ROTARY_ANGLE_SENSOR A1
#define ADC_REF 5
#define GROVE_VCC 5
#define FULL_ANGLE 300
//Initialize pin 2 to input for touch sensor
lcd.setRGB(100, 100, 100);
lcd.print("SETTING UP . . . ");
int SoundLevel = analogRead(A0);
//Rotary angle sensor
int degree = getDegree();
//Touch sensor -->> LCD goes red and everything gets replaced with a warning message
int tState = digitalRead(2);
if (tState != 0)
lcd.setRGB(100, 0, 0);
//RESET the LCD
int sensor_value = analogRead(ROTARY_ANGLE_SENSOR);
voltage = (float)sensor_value * ADC_REF / 1023;
float degrees = (voltage * FULL_ANGLE) / GROVE_VCC;
Step 3: Test & Results
Burn the code on your Intel Edison kit and observe the values as displayed on the LCD. Experiment with the sensors to get different values. The values are displayed on the LCD.
The image above shows the LCD display during operation.