Posts: 1
Joined: Fri Mar 09, 2018 10:01 pm

coding GPIO high/low input pins on Scratch

Fri Mar 09, 2018 10:14 pm

Hi there,

I am completely new to scratch and I was wondering what the most simple way of coding GPIO high/low input pins were? I was hoping to implement cases where, when a certain GPIO pin is low, a note is played from the midi sound system using a pHAT DAC with a Raspberry Pi Zero. Any help would be greatly appreciated.

Thank You!

Posts: 3304
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: coding GPIO high/low input pins on Scratch

Fri Mar 09, 2018 10:35 pm

There is an example of scratch and gpio inputs in the parents guide under physical computing ... -scratch/8
Please only ask questions in the forum I will not answer questions sent to me directly via PM
Remember we want information no help
The use of crystal balls & mind reading is not supported

Posts: 1161
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: coding GPIO high/low input pins on Scratch

Sun Mar 11, 2018 8:00 pm

there are two things to solve, get a button press and then play a sound.
The example cited from pcmanbob is for scratch1.4 with gpioserver. When using scratch2, then see ... pberry-pi/.

For playing sounds, there is an option using scratchclient and sonicpi. I noticed that sound quality of scratch sounds is not very good, but sonicpi has astonishing good sound quality. Fortunately sonicpi has an interface and there was a possibility to connect this with scratchClient to scratch1.4 and scratch2.
See for some details.

Return to “Scratch”

Who is online

Users browsing this forum: No registered users and 1 guest