Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:extensions:exti2csensor [2018/03/28 14:19]
kniwwelino [BME-280]
en:extensions:exti2csensor [2019/12/04 06:11] (current)
kniwwelino [SHT-30]
Line 1: Line 1:
 +====== Adding external I2C Sensors ======
  
 +The Kniwwelino Board features a 4-pin connector which is using the I2C protocol ([[wp>I²C]]). This protocol allows you to connect various different sensors (up to 127 at once) 
 +
 +===== 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. 
 +
 +{{:en:extensions:i2c_1.jpg?direct&400|}}{{:en:extensions:i2c_2.jpg?direct&400|}}
 +
 +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://www.seeedstudio.com/Grove-I2C-Hub-p-851.html|I2C hub]] can be used.
 +
 +{{:en:extensions:i2c_3.jpg?direct&400|}}
 +
 +
 +===== 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://github.com/adafruit/Adafruit_BME280_Library
 +  * **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://github.com/adafruit/Adafruit_BME680
 +  * **I2C Address:** **0x77** [0x76, 0x77]
 +  * 
 +==== SHT-30 ====
 +  * ** Available Values:**  
 +    * Temperature in °C
 +    * Humidity in %
 +  * **Used Library:** Modified WEMOS SHT30 library: https://github.com/derFrickler/WEMOS_SHT3x_Arduino_Library
 +  * **I2C Address:** **0x45**  [0x44, 0x45]
 + 
 + 
 +==== HTU21D ====
 +  * ** Available Values:**  
 +    * Temperature in °C
 +    * Humidity in %
 +  * **Used Library:** Adafruit HTU21D library: https://github.com/adafruit/Adafruit_HTU21DF_Library
 +  * **I2C Address:** **0x40**
 +==== BH1750 ====
 +  * ** Available Values:**  
 +    * Light Level in lux [0-65535]
 +  * **Used Library:** BH1750 Library 1.1.3 https://github.com/claws/BH1750
 +  * **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://github.com/derFrickler/Adafruit_APDS9960
 +  * **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 ''Sensors'':
 +
 +{{:en:extensions:sensors_1.png|}}
 +
 +{{:en:extensions:sensors_2.png|}}
 +
 +{{:en:extensions:sensors_3.png|}}
 +
 +{{:en:extensions:sensors_4.png|}}
 +
 +{{:en:extensions:sensors_5.png|}}
 +
 +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:
 +
 +{{:en:extensions:sensors_example.png|}}