Right, so I am looking at the schematics again and I think the issue is that button pins are in a pull-down configuration instead of pull-up as the button on the cape itself. This means that as far as the bela-cape-btn program is concerned, the button is pressed when it is not actually pressed and viceverse. So, first off, to get this to work again you should be able to boot the board while hold pressing the button. Keep it pressed until you manage to ssh in and run systemctl stop bela_button
. Then you should be able to release the button and the board should stay up. If holding the button is complicated you can disconnect your Bela from Pepper and run a jumper wire from 3v3 (P9.03) to the pin (P8.27).
Once you re-acquire control of the board, edit /lib/systemd/system/bela_button.service
adding --pressed 1
to the argument list. This will tell it that the button is pressed when a 1
is read (default is opposite, which is causing the current behaviour).
I think this should work as far as the systemd
service is concerned. However, the Bela program will fail to start saying "button pressed ... exit". I don't have a command line option / setting to fix that yet. For now you should make a manual change to /root/Bela/core/PRU.cpp
: the line that reads if(stopButton.read() == 0){
should become if(stopButton.read() == 1){
. If this works, I can add a command-line option for it that can be stored in belaconfig
in a couple of weeks from now.