Skip to content

Sensor connection

vrano edited this page Sep 23, 2020 · 1 revision

The next step is to connect the Raspberry Pi and the sensor.

Physical connection

(To Be Updated)

Logical connection

After connecting the sensor, open a terminal on the Raspberry Pi and type:

sudo i2cdetect -y 1

to check if the Raspberry Pi can detect the sensor.
You will see something like this:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

This means two things.

  1. The sensor is detected.
  2. Communication with the sensor should be on channel 1, address 0x57.

Step-by-step

  1. Raspberry Pi setup
  2. Sensor connection
  3. Run code
  4. Generate graph
Clone this wiki locally