Creating a thermometer with Arduino, a DS18B20 temperature sensor, and a 7-segment display module.
I had a spare Arduino UNO and a DS18B20 temperature sensor and I decided to build an accurate thermometer (something I wanted to develop for a long time). As I wanted to be portable I attached a 9V battery to power the Arduino. To display the temperature I used a 3 digit 7-segment display module which has 3 74HC595 shift registers integrated and can managed only by 3 cables. I advice you to use the module and not 3 individual shift registers to avoid the soldering (too many connections must be made). I use 1 decimal point to display temperatures in Celsius except for temperatures below -9.9 (because I would need one more digit). So, the display shows temperatures from -99 to -10, then from -9.9 to 0.0 and then up to 99.0. As for the look I wanted to look a little wild and harsh, so I ended up to a walkie-talkie style (someone can say that it looks like a bomb). Personally, I love it.
I2C communication in Raspberry Pi 5 with PCF8574 and Python.
On Raspberry Pi 4 I was using the Python library pcf8574-io for I2C communication using the PCF8574 chip. However this library does not work on the newer Raspberry Pi 5. To be accurate, you can install it in RPi 5 using pip3 in a virtual environment (venv), however in my case I wanted my script to run as a service in global scope. So a virtual environment was not a choice. Most of the PCF8574 related code I found on the internet was outdated for Rpi4. After some search I found a Python library from jhaubrich on github which actually works. In this article I will give you a how-to guide for having I2C communication with PCF8574 chip and Python on Raspberry Pi 5. I access Raspberry from a terminal window using SSH (use PuTTY or other client).
