From the course: Raspberry Pi: GPIO
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Install software and test
- [Instructor] With the hardware all installed, let's set up the software to control these devices. Now is the time to connect power to the Raspberry Pi and let it boot up. This is also a good time to connect the five volt battery to the PCA9685. When the Raspberry Pi is booted up, go to preferences, Raspberry Pi configuration, interfaces, and enable I2C. Now check to make sure both devices are on the I2C bus. To do that, open up a terminal window, and type in sudo i2cdetect -y 0. You may get an error, that's okay. Also type in sudo i2cdetect -y 1. There's a couple of notes you'll want to take here. First of all, in my case, -y 1 gave me results back, and that's what's expected. The second thing that it did is give me a couple of numbers. You can see in the line that starts with 40, there's the number 40, and the line that starts with 70, there's the number 70, and at the very end is the number 77. You'll want to make a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introduction to I2C devices1m 10s
-
(Locked)
Connect the servo controller via I2C3m 54s
-
(Locked)
Connect the BME280 via I2C1m 27s
-
(Locked)
Install software and test5m 52s
-
(Locked)
Control the BME280 and PCA96852m 56s
-
(Locked)
What you learned about I2C1m 33s
-
(Locked)
I2C in depth5m 17s
-
(Locked)
-
-
-