Posts: 1
Joined: Fri Sep 21, 2018 7:12 am

Using capacitive sensor MPR121 with Scratch

Fri Sep 21, 2018 8:58 pm

Hi, I'm want to make a drum set similar to one here using Raspi, Capacitive sensor MPR121 hat and program it with Scratch. See link here:


My issues are:
- I don't see anywhere on Scratch that recognizes the sensor pads. Even on the "Sensor" commands, I don't see it. Also, even when I make a new block enabling the GPIO, I can't see or input the pin number.

Is there any way to do this?

How do I program on Scratch to recognize the capacitive sensor hat.


User avatar
Posts: 312
Joined: Mon Dec 15, 2014 7:14 pm
Location: Noo Joysey, USA

Re: Using capacitive sensor MPR121 with Scratch

Sat Sep 22, 2018 1:16 pm

The MPR121 is an i2c device and there is no simple way to interface i2c to Scratch. Each i2c has its own command/control protocol. If you feel ambitious and have some Python experience, you can try creating your own Scratch extension using the s2-pi library as a basis:

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

Re: Using capacitive sensor MPR121 with Scratch

Mon Nov 19, 2018 7:24 pm

Hello, I have added a MPR121-adapter to scratchClient. You can use this with scratch1.4 and scratch2.
The adapter supports level signals 0, 1 for not touched, touched and broadcast events when level changes from 0->1.
scratchClient can be downloaded from http://heppg.de/ikg/wordpress/?page_id=6

Return to “Scratch”