In this experiment we shall use a user input block which scans the I2C port for supported sensors, and shows the user a list of detected sensors to select from.
The parameters supported by the selected Sensor are automatically fed into the adjacent drop-down menu for the user to select.
Sensors which use the I2C communication interface require 4 connections to be made.
*If the sensor chip itself operates at 5V(INA219, some boards of QMC5883L etc), the pull up should be to 5V , or else communication errors will occur. To do this, connect a 2K resistor each from SCL to 5V, and from SDA to 5V (this can be done on the SCL,SDA,5V pins located at the top right side of the 40*2 connector of SEELab)
* The device is able to obtain the list of I2C addresses which have responded during the scan. The names of the sensors are then guessed based on a predefined map of sensors and their commonly known addresses.
If 2 sensors are known to be sold with the same address, both will be shown to the user in the list (e.g., TCS34725 and VL53L0X are sold with address=41) . Choose accordingly.
Some sensors have additional configurations, and multiple parameters to choose from.
E.g., the MPU6050 allows choosing the input ranges of the accelerometer and gyroscope. Click on the configure option, and select the required range before starting acquisition.
It also has 6 parameters to choose from : acceleration along 3 axes, and angular velocity along 3 axes
For the TSL2561 LUMINOSITY sensor, 2 options, IR, full spectrum are available. One is chosen and logged in the first picture.