From the course: Raspberry Pi Essential Training
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Other languages used to control the GPIO
From the course: Raspberry Pi Essential Training
Other languages used to control the GPIO
- We've talked about how to use Python and Scratch to control switches and lights connected to the Raspberry Pi GPIO. But these aren't the only languages available for the Raspberry Pi. Because the Raspberry Pi OS is based on Debian Linux it comes with several languages and supports the installation of many more. Many languages have integrated support for the GPIO including Python, Java, and Scratch. However, there are several others. And the good news is is that any language that can make calls to the operating system can use libgpiod method to control the GPIO. Let's take a minute to tear apart an example of how libgpiod is used with a Bash shell scripting language. These concepts then apply to most of the languages such as COBOL or R. Here's an example of our ongoing GPIO project written in Bash. Like the Python and Scratch examples, this program flashes the LED until the button is pressed and then it turns the LED on and waits until the button is released. Let's examine the…
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.