I'm running a script at log-in on my Raspberry Pi B+ (I call it in the .bashrc). The script runs Jack-Audio and then launch a Pure Data patch that deals with audio and GPIOs. The audio part works well but not the GPIO one (a led should be on when the Pd patch opens and a button should let me switch it on/off).

It looks like pdwiringPi can't speak to GPIOs when called in a script on log-in whereas when I run this script manually after logging in, it works fine.

I precise that I don't have any errors whatever the method I use (automatic on log-in or manually after logging in)

Am I doing something wrong when using the pdwiringPi in Pure Data at log-in?

Here is the script:

export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket  
sleep 2  
jackd -dalsa -D -i 2 -o 2 -n 3 -r 44100 -p 256 -P&  
sleep 2  
pd-extended -rt -jack -nogui  -open wire.pd     

closed as unclear what you're asking by goldilocks Feb 7 '15 at 12:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Welcome -- please take the tour. If you are trying to find out why your script does not work in a specific context, we need to see some code. – goldilocks Feb 7 '15 at 12:49
  • Hi, I've just reworded my problem and added the script. Hope it helps. – Corentoulf Feb 8 '15 at 0:28
  • Wow, I missed this in the reopen queue. That is 100% my fault -- I'm very sorry. You'd be better off reposting this question now as it is too old to get noticed if reopened (and I can't effect that). I'd also suggest you try the first method here to redirect output to a log file so you can see any errors, etc. that may occur when run at boot. You will have to define $LOG_FILE, e.g. LOG_FILE=/tmp/mybootscript.log. – goldilocks Feb 24 '15 at 13:12