Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.42 KB

README.md

File metadata and controls

31 lines (20 loc) · 1.42 KB

Humidity

This container handles the humidity and temperature sensor of the weather station.

This container is using Python and the smbus2 library. The sensor itself uses the I2C.

Wiring

Ground and power of the SHT-30 are connected to ground and 3V on the Pi respectively. The SCK (yellow) of the sensor connects to SCL1 (GPIO 3) of the PI and DATA (blue) to SDA1 (GPIO 2).

Balena

To enable the I2C overlay for the PI using Balena, "i2c_arm=on" must be specified as device tree (DT) parameter.

Development

In order to test the code easily, the container uses a trick to allow using PyCharm locally and execute the code in the remote container. For that the container needs to open an SSH port. This can be achieved setting the device service variable START_SSHD=1. This will start sshd and allow PyCharm to sue the container as a remote execution environment.

NOTE: This is a development trick/hack. In a production environment the sshd config should be removed.

Misc