I2C with Arduino and Raspberry Pi - Two Methods

DroneBot Workshop September 16, 2019
Video Thumbnail
DroneBot Workshop Logo

DroneBot Workshop

View Channel

About

Welcome to the Workshop! The DroneBot Workshop is the place where I work with Arduino, Raspberry Pi, ESP32, and lots of other cool microcontrollers, components, and sensors. This is a channel for learning and understanding. While I do build projects, most episodes focus on showing you HOW things work, so you can use the information to bring your own designs to life. Every video has a corresponding article on my website at https://dronebotworkshop.com , along with the diagrams and code samples you’ll need to build your own creations. You can also participate in discussions on my Forum at https://forum.dronebotworkshop.com. Please note that I no longer do any sponsored videos, enquiries for these will be ignored! If you'd like to know more about me or the DroneBot Workshop you can read the FAQ at https://dronebotworkshop.com/about-dronebot-workshop/faq/ And if you have technical questions please ask them on the Forum. Welcome to the Workshop! I hope you enjoy your stay! Bill

Video Description

In the third installment of the I2C series, I will show you two ways to interface a 3.3-volt Raspberry Pi with a 5-volt Arduino Uno. Article with code samples - https://dronebotworkshop.com/i2c-arduino-raspberry-pi/ More tutorials and articles - https://dronebotworkshop.com Join us on the forum and have your say - https://forum.dronebotworkshop.com Sign up for the newsletter - https://dronebotworkshop.com/subscribe/ Today we are back working with the I2C bus, and this time we’ll be interfacing an Arduino with a Raspberry Pi. By hooking an Arduino to a Raspberry Pi we can get the best of both worlds. The Raspberry Pi is a powerful single-board computer, capable of running a Linux operating system and connecting natively to the internet. The Arduino is a very capable microcontroller with several I/O pins, an Analog to Digital converter, and precise timing and interrupt capabilities. Together, they make an incredible team. But one issue is that the two devices use different logic levels. The Raspberry Pi GPIO (General Purpose Input/.Output) bus operates using 3.3-volt logic, while most Arduino’s use 5-volt logic. Incorrectly interfacing them can lead to a non-functional Raspberry Pi, a situation best avoided! You CAN hook the two devices together directly, providing that certain specific conditions are met. Alternatively, you can use a very inexpensive logic level converter to isolate the 3.3-volt and 5-volt logic safely. In this video, I will show you both methods. Here is what you will see in today's video: 00:00 - Introduction 03:42 - I2C Logic Levels 06:47 - Raspberry Pi I2C Busses 08:30 - Setting up the Raspberry Pi 14:15 - Direct Hookup 15:35- Arduino Sketch 17:31- Raspberry Pi Python Code 20:30- Running the Demo 24:02- Using a Logic Converter While the demonstration is extremely simple it does effectively illustrate how easy it is to interface these two popular boards. We will be looking at I2C one more time, in a couple of weeks. So if you haven’t subscribed to the channel yet please do, that way you won’t miss out on anything. Thanks for watching! Looking forward to chatting with you on the DroneBot Workshop Forum soon.

You May Also Like

I2C Mastery Kit Essentials

AI-recommended products based on this video

Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22
Loading...
DHT11 modules Digital Temperature and Humidity Temperature Sensor for arduino DIY KIT 5pcs

DHT11 modules Digital Temperature and Humidity Temperature Sensor for arduino DIY KIT 5pcs

(1)
$15.99
FREE delivery Sat, Jun 14 on your first order
Loading...
eufy Security 5-Piece Home Alarm Kit, Home Security System, Keypad, Motion Sensor, 2 Entry Sensors, Home Alarm System, Control from The App, Links with eufyCam

eufy Security 5-Piece Home Alarm Kit, Home Security System, Keypad, Motion Sensor, 2 Entry Sensors, Home Alarm System, Control from The App, Links with eufyCam

(975)
$169.99
FREE delivery Wed, Aug 20
100+ bought in past month
Loading...
PlayPawz Automatic Caterpillar Smart Cat Toy - Rechargeable Kitten Toys Moving Cat Toy - Smart Sensor Caterpillar Cat Toy - Interactive Cat Toys for Indoor Cats - Suction Cup Toy for Cat Enrichment

PlayPawz Automatic Caterpillar Smart Cat Toy - Rechargeable Kitten Toys Moving Cat Toy - Smart Sensor Caterpillar Cat Toy - Interactive Cat Toys for Indoor Cats - Suction Cup Toy for Cat Enrichment

(20)
$39.99
FREE delivery Thu, Sep 11
Loading...
VersionTECH. Gaming Mouse Ergonomic Wired Computer Mouse with 7 Colors LED Backlight, 4 DPI Settings Up to 3600 DPI Compatible for Chromebook Windows 7/8/10/11 XP/Mac/Linux Gamer/Notebook/MacBook
Best Seller

VersionTECH. Gaming Mouse Ergonomic Wired Computer Mouse with 7 Colors LED Backlight, 4 DPI Settings Up to 3600 DPI Compatible for Chromebook Windows 7/8/10/11 XP/Mac/Linux Gamer/Notebook/MacBook

(15,947)
$12.79
FREE delivery Thu, Sep 11 on your first order
500+ bought in past month
Loading...
TMKB 60% Mechanical Gaming Keyboard, Brown Tactile Switch, LED Backlight, Anti-Ghosting, Detachable USB-C, Double-Shot Keycaps, 61 Keys, Wired, White

TMKB 60% Mechanical Gaming Keyboard, Brown Tactile Switch, LED Backlight, Anti-Ghosting, Detachable USB-C, Double-Shot Keycaps, 61 Keys, Wired, White

(35)
$39.99
PrimeFREE delivery Sat, Jun 14
Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22
Loading...
DHT11 modules Digital Temperature and Humidity Temperature Sensor for arduino DIY KIT 5pcs

DHT11 modules Digital Temperature and Humidity Temperature Sensor for arduino DIY KIT 5pcs

(1)
$15.99
FREE delivery Sat, Jun 14 on your first order