Raspberry Pi Pico (RP2040) I2C Example with MicroPython and C/C++ | Digi-Key Electronics

Описание к видео Raspberry Pi Pico (RP2040) I2C Example with MicroPython and C/C++ | Digi-Key Electronics

Inter-Integrated Circuit (I2C) is a common communication protocol used by many microcontrollers and sensors to pass data back and forth. It relies on 2 pins for communication:
- Clock (SCL)
- Data (SDA)

The pins to control these lines are required to be open drain in order to support more than 2 devices on the bus. As a result, external pull-up resistors are required on the lines. The sensor breakout board we use in the video already contains these resistors, so you do not need to provide your own.

In this video, we show you how to use I2C from the Raspberry Pi Pico to communicate with an ADXL343 accelerometer. We give an example in MicroPython as well as C/C++.

A written form of this tutorial along with the code can be found here: https://www.digikey.com/en/maker/proj...

More information about I2C can be found in this article: https://www.analog.com/en/technical-a...

We recommend following this guide to set up the toolchain and VS Code if you are working with the Raspberry Pi Pico C/C++ SDK: https://www.digikey.com/en/maker/proj...

I2C is often used for relatively low data rates (100 or 400 kHz), although faster modes (1 MHz and 3.4 MHz) exist for devices that support them. Unlike SPI, I2C uses just 2 lines for every device on the same bus, which keeps the required pin count low. As a result, device packages can be smaller, which is why I2C is popular with sensor manufacturers.

Product Links:
https://www.digikey.com/en/products/d...
https://www.digikey.com/en/products/d...

Related Videos:
Intro to Raspberry Pi Pico and RP2040 - MicroPython Part 1: Blink -    • Intro to Raspberry Pi Pico and RP2040...  
Intro to Raspberry Pi Pico and RP2040 - C/C++ Part 1: VS Code and Blink -    • Intro to Raspberry Pi Pico and RP2040...  
Intro to Raspberry Pi Pico and RP2040 - C/C++ Part 2: Debug with Picoprobe -    • Intro to Raspberry Pi Pico and RP2040...  

Related Project Links:
https://www.digikey.com/en/maker/proj...
https://www.digikey.com/en/maker/proj...
https://www.digikey.com/en/maker/proj...

Learn more:
Maker.io - https://www.digikey.com/en/maker
Digi-Key’s Blog – TheCircuit https://www.digikey.com/en/blog
Connect with Digi-Key on Facebook   / digikey.electronics  
And follow us on Twitter   / digikey  

Комментарии

Информация по комментариям в разработке