From the course: Raspberry Pi: GPIO
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Python and GPIO Zero control of GPIO
From the course: Raspberry Pi: GPIO
Python and GPIO Zero control of GPIO
- [Instructor] Let's start with using Python to control the Raspberry Pi GPIO. You'll notice there are two videos dedicated to Python, this is because Python is popular and Python provides two libraries. Actually there are more than two but gpiozero and RPI.GPIO are the most popular. Now I've provided some example code that shows how to drive the binary counter with Python and gpiozero. We're looking at that right now. The main thing to remember about Python with the gpiozero library is that it focuses on buttons and LED instead of the actual GPIO pins. For example, in line eight the gpiozero library is used to create a button. The button is called reset, and it equals gpzero.button. Almost as an after thought that button is assigned to GPIO pin three, now note that this numbering is BCM numbering not board pin three. BCM pin three corresponds to GPIO board pin five. gpiozero provides some interesting additions. For…
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 programming the Raspberry Pi GPIO3m 37s
-
(Locked)
Python and GPIO Zero control of GPIO5m 23s
-
(Locked)
Python and RPi.GPIO control of GPIO4m 51s
-
(Locked)
Scratch control of GPIO8m 2s
-
(Locked)
Bash control of GPIO8m 35s
-
(Locked)
Node-RED control of GPIO8m 13s
-
(Locked)
C control of GPIO6m 28s
-
(Locked)
Java control of GPIO8m 7s
-
(Locked)
Wolfram control of GPIO3m 59s
-
(Locked)
Binary and bitwise math8m 34s
-
(Locked)
-
-