[SOLVED] Momentary Push Button + Scratch to control GrovePi and PivotPi

Hi everyone, I’m a super beginner here so please forgive my ignorance. I recently purchased a PivotPi board for my Raspberry Pi, and just started learning with Scratch. My project uses servos but I wanted to know, is there a way to add a momentary switch to the PivotPi, without using a breadboard?

My goal is to be able to skip between programs with each click, so I purchased a metal pushbutton and wire pair hoping to connect it. As I said before, forgive my ignorance because the wire came with a three prong plug that I think goes exactly where the PivotPi hat is plugged into, so I think that idea is out.

Is there a more obvious way I should do this? Is there a plug-in way of adding a momentary switch, perhaps into the pivot-pi board if that is even possible? Sorry again for the dumb question. D:

Hi @skylerxox,

I’m afraid you can’t connect anything else other than servos to a PivotPi.

If you have a GrovePi around, then you can use that for this sensor - you just need to make sure you can connect the sensor to the board with a Grove cable. Doing the soldering shouldn’t be that hard.

If you do not have one, then the best option is still to use breadboard for it - or at least Dupont cables for directly connecting the Pi to a momentary switch.

Thank you!

Thank you RobertLucian for the quick response.

I’m now leaning towards purchasing a GrovePi as it has more options, but I’m still in need of something to control the servos on my project. I see that a site called Seeed sells GrovePi compatible servos, but wouldn’t that need a servo controller?

EDIT: After some research I read that for controlling the servos with the Raspberry Pi you can connect the PivotPi to GrovePi’s I2C port and then actuate the servos through a Python script. If this is true, can someone tell me if both can be programmed in Scratch?

Hi @skylerxox,

So the idea is that you can mount a GrovePi on your Pi and then to GrovePi’s I2C port you can connect PivotPi just fine. And then to your PivotPi you can have analog servos connected to it.

By the way, those servos don’t have the traditional 3-pin port and those seem to be adapted for the GrovePi port, though I’m not sure to what purpose. Just use regular standard servos and you’ll be good.

Thank you!

Indeed you can use Scratch to control the GrovePi and PivotPi together and it works just fine.


Thank you guys so much, you’ve been very helpful!