Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:extensions:exti2csensor [2018/03/28 14:16] – [BME-680] kniwwelino | en:extensions:exti2csensor [2019/12/04 06:11] (current) – [SHT-30] kniwwelino | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Adding external I2C Sensors ====== | ||
| + | The Kniwwelino Board features a 4-pin connector which is using the I2C protocol ([[wp> | ||
| + | |||
| + | ===== Connecting the Sensor ===== | ||
| + | |||
| + | The I2C connector on the Kniwwelino as well as all supported I2C sensors have the following four pins: | ||
| + | * **VCC** 3.3V provided by the Kniwwelino Board to power the sensors. | ||
| + | * **GND** Common Ground | ||
| + | * **SDA** Serial Data Line | ||
| + | * **SCL** Serial Clock Line | ||
| + | |||
| + | These 4 pins must be connected 1 to 1 from the Kniwwelino board to the sensor. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Other sensors can be wired in parallel by connecting them the same way either at the Kniwwelino board or one of the connected sensors. For easier connection an [[https:// | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | ===== Supported Sensors ===== | ||
| + | If you add your own I2C sensors, please note that the LED matrix chip is using the address 0x70. | ||
| + | ==== BME-280 ==== | ||
| + | * ** Available Values: | ||
| + | * Temperature in °C | ||
| + | * Humidity in % | ||
| + | * Pressure ind hPa | ||
| + | * Height in m | ||
| + | * **Used Library:** Adafruit BME280 Library 1.0.7 https:// | ||
| + | * **I2C Address:** **0x76** [0x76, 0x77] | ||
| + | |||
| + | ==== BME-680 ==== | ||
| + | * ** Available Values: | ||
| + | * Temperature in °C | ||
| + | * Humidity in % | ||
| + | * Pressure ind hPa | ||
| + | * Height in m | ||
| + | * Gas: volatile organic compounds (VOC) in Ohm | ||
| + | * **Used Library:** Adafruit BME680 Library 1.0.5 https:// | ||
| + | * **I2C Address:** **0x77** [0x76, 0x77] | ||
| + | * | ||
| + | ==== SHT-30 ==== | ||
| + | * ** Available Values: | ||
| + | * Temperature in °C | ||
| + | * Humidity in % | ||
| + | * **Used Library:** Modified WEMOS SHT30 library: https:// | ||
| + | * **I2C Address:** **0x45** | ||
| + | |||
| + | |||
| + | ==== HTU21D ==== | ||
| + | * ** Available Values: | ||
| + | * Temperature in °C | ||
| + | * Humidity in % | ||
| + | * **Used Library:** Adafruit HTU21D library: https:// | ||
| + | * **I2C Address:** **0x40** | ||
| + | ==== BH1750 ==== | ||
| + | * ** Available Values: | ||
| + | * Light Level in lux [0-65535] | ||
| + | * **Used Library:** BH1750 Library 1.1.3 https:// | ||
| + | * **I2C Address:** **0x23** [0x23, 0x5c] | ||
| + | |||
| + | ==== ADPS9960 ==== | ||
| + | * ** Available Values: | ||
| + | * Proximity: numeric value, 0=far to 255=near | ||
| + | * Gesture: numeric value, 1=UP 2=DOWN 3=LEFT 4=RIGHT | ||
| + | * Light Components for White Red Green Blue: numeric value, 0-65536 but mostly in the range of 0-100 | ||
| + | * **Used Library:** Modified Adafruit_APDS9960 library: https:// | ||
| + | * **I2C Address:** **0x39** | ||
| + | |||
| + | ===== Programming the i2c Sensors ===== | ||
| + | You can read the sensor data and use it in your application with the following blocks, listed in '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Choose the block with the same reference number as your sensor, and select the value you want to read. | ||
| + | |||
| + | For example, to read the temperature with the SHT30 Sensor every 5 seconds, and display it on the matrix, you would use the following blocks: | ||
| + | |||
| + | {{: | ||