Raspberry Pi Pico / Tiny2040 Temperature Sensor using I2C and OLED display

Опубликовано: 14 Февраль 2025
на канале: Penguin Tutor
3,623
49

How to use a Raspberry Pi Pico as a temperature display. This uses a tiny 0.9 inch OLED display with a AM2320 temperature sensor.


In this case I’ve used a different variant of the Pico which is the Tiny 2040 from Pimoroni. This is based around the same microcontroller, which is the RP2040 created by Raspberry Pi.


The temperatures sensor I using here is the AM2320. This is similar in appearance to the DHT11 which I have used in previous projects. The AM2320 can use a single-wire interface like the DHT11 uses, but it also includes support for I-squared-C which is what I used.

To display the output I’ll be using a tiny 0.91 inch OLED screen (SSD1306).

This is a tiny monochrome screen with a easy to read display which can display text or monochrome graphics. The screen has a resolution of 128 x 32 pixels. I actually bought this to create a departure sign for a model railway, but I thought it made a good fit for this circuit as well.

For more details and to download the software see: http://www.penguintutor.com/electroni...

Chapters:
00:00 Introduction to temperature project
00:13 Raspberry Pi Pico vs Tiny 2040
02:50 AM2320 Temperature and Humidity sensor
04:34 OLED display (SSD1306)
06:03 I2C wiring
06:31 Sofware download and Micropython libraries
09:29 Micropython code
11:16 Summary