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.

Scratch control of GPIO

Scratch control of GPIO

From the course: Raspberry Pi: GPIO

Start my 1-month free trial

Scratch control of GPIO

- [Instructor] Scratch is a visual programming language where you connect code blocks to make programs. With Scratch, you can control graphics, sound, and the Raspberry Pi GPIO. Let's take a look at how to use it to control our binary counter. Open 08_04 scratch gpio from the example files. And Scratch will open a program and you'll see a colorful flowchart and a cat. Ignore the cat, let's focus on the Scratch program. If you need information on programming scratch for the Raspberry Pi, please take a look at my companion course, Raspberry Pi Essential Training. Specifically the video titled Use Scratch to control the interaction. In particular, the essential training video describes how to access and set up GPIO pins as input and output. I won't repeat that information here. In the code that we're looking at, you see two columns of code. The column on the left is the main loop and the column on the right is a block or…

Contents