» From sites » Specialist »Digital LED Thermometer

Digital LED Thermometer




A small article on how to make such a cute thermometer with a display and color indication. The thermometer works with the Raspberry Pi Zero W.
It automatically switches the list of cities and displays the temperature on the OLED display and LED scale. You can also select a city to display manually using the buttons on the side. The thermometer has an energy-saving function and will turn off the LEDs and OLED if it is inactive for several minutes, and will turn on again if it detects a significant change in light (controlled by a photoresistor).

Tools and materials:
-Raspberry Pi Zero;
-1.5-inch OLED module;
- Power supply 5 V 2.4 A;
- LED strip WS2812B- 5 meters;
-Fasteners;
-Printed circuit board;
-Soldering accessories;
-Glue gun;
- Joiner's glue;
-Plywood;
-Acrylic;
CNC laser cutting;


Step One: Weather Data
The wizard collects weather data for free with OpenWeatherMap.org. This site provides weather data from many large cities in many countries of the world.
First you need to register at OpenWeatherMap.org.
Then copy your API key for later use.
Next, download, unzip and open the city.list.json.gz file.
Select the desired cities and copy their identifiers.
city.list.json.gz

Step Two: Configure R Pi and Code
First, the wizard connected the display to Raspberry, and installed the necessary libraries for OLED, as described by the manufacturer here.
Next, you need to make sure that the R Pi is connected to the Internet.
1. Enable the I2C and SPI function in raspi-config in the “Interfacing Options” section. Exit and reload the program.
2.Run again to update:
sudo apt-get update

3. Run the following commands to install the required libraries:
sudo apt-get install python-dev
sudo apt-get install python-smbus
sudo apt-get install python-serial
sudo apt-get install python-imaging

4. Run the following command to open the configuration file:
sudo nano / etc / modules

Make sure the following two lines are in the configuration file, then exit and reboot:
i2c-bcm2708
i2c-dev

5 Run:
git clone https: / /github.com/Anders644PI/1.5inch-OLED-with-RPi .git

6. Go to the new folder and unzip RPi_GPIO-0_6_5.zip:
unzip RPi_GPIO-0_6_5.zip

Run to install the libraries:
cd RPi_GPIO-0_6_5 sudo python setup.py install

7. Return to the main folder:
cd /home/pi/1.5inch-OLED-with-RPi/
Or
cd
spidev-3_2.zip.

8. Then unzip Pi.zip:
unzip wiringPi cd wiringPi

Run the commands:
chmod 777 build ./build

Check installation:
gpio –v

9. Return to the main folder and unzip bcm2835-1_45.zip
unzip bcm2835-1_45.zip
cd bcm2835-1_45

10. Run:
./configure
make
sudo make check
sudo make install

11. Return to /home/pi/1.5inch-OLED-with-RPi/ again and run to check the display:
cd / Demo_Code / Python /
sudo python main.py

The wizard then installs the libraries for the WS2812B LED strip, following this guide.
Next, you need to write and download the code. Code can be downloaded here.
Digital LED Thermometer

Step Three: Set Up Weather API
1. Go to LED_Thermometer_Code_and_OLED_driver:
cd LED_Thermometer_Code_and_OLED_driver

2. Then open Official_Digital_LED_Thermometer_v1-0.py:
nano Official_Digital_LED_Thermometer_v1-0.py

And then scroll down and change the api key to your api from openweathermap.org, as shown in the picture above. Also change the city identifiers and city names according to the desired location.

Step Four: PCB
Next, the master designed and ordered a printed circuit board.



Step Five: Laser Cutting + Assembly
Then the master designed and cut the case out of plywood, and the diffuser made of acrylic.
After that, the wizard installed electronics and LED strip into the housing. Assembled the case.
The buttons were printed by the master on a 3D printer.
All files can be found and downloaded at Github.


All is ready.




10
10
10

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose

We advise you to read:

Hand it for the smartphone ...