У нас вы можете посмотреть бесплатно Intro to Embedded Rust Part 5: Reading from an I2C Temperature Sensor | DigiKey или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
This tutorial covers how to use Inter-Integrated Circuit (I2C) communication in embedded Rust on the Raspberry Pi Pico 2. I2C is one of the most widely used protocols in embedded systems, enabling microcontrollers to communicate with sensors, displays, memory chips, and countless other peripherals using just two wires. We'll build on our USB serial template to create a temperature monitoring application that reads data from a TMP102 I2C sensor and displays it over USB serial when you press a button. The written guide for this episode can be found here: https://www.digikey.com/en/maker/tuto... The GitHub repository containing the Docker image and example code for this series can be found here: https://github.com/ShawnHymel/introdu... We’ll explore how to configure GPIO pins for their alternate I2C functions using the rp235x-hal, initialize the I2C peripheral with the proper clock speed (100 kHz standard mode), and perform write-read operations to communicate with I2C devices. We explain I2C addressing and how to access device registers. The tutorial walks through reading the TMP102's datasheet to understand its register layout, performing combined write-read transactions, and converting raw binary sensor data into meaningful temperature values in degrees Celsius. You'll see practical bit manipulation techniques including shifting and masking to extract 12-bit signed temperature values from the sensor's two-byte response. The project also introduces important embedded Rust patterns beyond just I2C. We demonstrate button input handling with pull-up resistors and implementing edge detection to trigger readings only on button press. You'll see how to use the heapless crate to work with fixed-size strings without heap allocation (essential for no-std embedded development where heap usage is often avoided). We show how to format floating-point temperature values into strings using the write! macro and core::fmt::Write trait, providing formatted output without the standard library. The tutorial also covers practical error handling for I2C operations using Rust's Result type, showing how to gracefully handle communication failures and display error messages over USB serial. The demo used in this tutorial provides a reusable template for interfacing with I2C devices that you can adapt for accelerometers, gyroscopes, displays, EEPROMs, and thousands of other I2C peripherals. Related Link: https://www.digikey.com/en/maker/tuto... Links: Getting Started with STM32 and Nucleo: • Getting Started with STM32 and Nucleo Part... Introduction to Real-Time Operating Systems (RTOS): • Introduction to RTOS Part 1 - What is a Re... Raspberry Pi Pico 2: https://www.digikey.com/en/products/d... Learn more: Maker.io - https://www.digikey.com/en/maker DigiKey’s Blog – TheCircuit https://www.digikey.com/en/blog Connect with DigiKey on Facebook / digikey.electronics And follow us on X: https://x.com/digikey Product: https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... https://www.digikey.com/en/products/d... Chapters: 0:00 Intro 0:45 Overview of TMP102 Temperature Sensor 3:14 Dependencies 4:00 Initialize Input Pin and I2C 13:11 Read and Print Temperature Value on Button Press 23:44 Build and Flash 25:24 Challenge and Reading Assignment 26:18 Conclusion