A breadboard is a board that helps you connect electronic components together and to your micro-computer Raspberry Pi. A small breadboard can be enough for this project (the GIF above were taken from the DIY Jukebox project with a bigger one.
First, let’s install the buttons on your breadboard. Separate each button enough. And connect hook-up wire between one of the leg of the button and the minus (-) line. That will allow us to use only one jumper wire for ground connection.
See GIF above
Now connect a jumper wire next to the other leg of each button (it must be on the same line number). This will make the data connection between your Raspberry Pi and the button to transform the physical push on the digital interface.
See 2nd GIF above
Now it’s time to connect those wires to the GPIO pins of your Raspberry Pi. Connect the wire in the ground line to a ground pin. Then connect each button jumper wire to GPIO pins, following the map below. For instance we chose here to connect with GPIO17, GPIO27, GPIO22.
Basically you can connect to any green pin on this map.
The physical connection is now done, we now need to set up the Prota Pi to recognize each button being pressed. For this we will use GPIO app in the next step.
SET UP YOUR SMART BUTTONS ON GPIO APP
GPIO app is an app that allows you to create command names for physical elements connected to your Raspberry Pi, like those buttons. We will later connect these commands into automation workflows (step 7).
- Go to App Libraries and download GPIO app
- Open GPIO app
- Click on GPIO 17 and set it to Interrupt // Pull up
- Click on “Set”
Now when you press your button, it should display on your GPIO interface (as below) “Rising interrupt” and “Falling interrupt”.
This means your Prota Pi reads the action of pressing the button. Now you can do the same thing with GPIO27 and GPIO22. Make sure all dots are lighten up like below, meaning all pins are set up.
Test each button to see if you do have for each the message “rising interrupt” / “falling interrupt”, which confirms the connection is working fine.