Загрузка...

Raspberry pi tutorial - Internal temperature sensor

In this episode we go straight to the Raspberry Pi Pico in VS Code to read the internal temperature sensor. We take the raw 16‑bit ADC value, convert it to voltage, then use the datasheet formula to get an actual Celsius reading. Then we wire up a LED on a GPIO pin as a dramatic little warning lamp: if the temperature crosses a threshold, we label it “critically high” and turn the LED on (otherwise it’s “good temp” and the LED stays off). Finally, we log the readings to a temps.txt file every 5 seconds using a context manager, flush writes for safety, and peek at the saved temperature history on the device.

Github
https://github.com/kokchun/raspberry_pi_yt_demos/tree/main/internal_temp_sensor

Datasheet
https://pip-assets.raspberrypi.com/categories/814-rp2040/documents/RP-008371-DS-1-rp2040-datasheet.pdf

#raspberrypi

00:00 Pico Temp Sensor Goal
00:32 MicroPico Setup
00:57 ADC Core Temp Basics
03:18 Convert Reading to Voltage
06:03 Datasheet Temperature Formula
08:03 Wire Up Warning LED
09:41 Loop Readings and Threshold
13:59 Log Temps to File
18:20 View Logged Results
19:14 Wrap Up and Next Steps

Видео Raspberry pi tutorial - Internal temperature sensor канала AIgineer
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять