I am calling a script called ‘pi_camera_script’ to take a picture using the RPi camera and then upload it to dropbox. I have followed the example of the pi camera project and have tested the script on the Pi through the command terminal. This all works fine.
When I call the script from my sketch:
Serial.println("5 minutes passed - take photo and upload"); Process proc = Process::run("/home/pi/bin/pi_camera_script"); // image capture and upload shell script proc.wait(); Serial.println("Done!");
It never exits.
If I monitor the serial outputs it just appears to freeze after the picture has been taken and on the dropbox_uploader
The script is like this
#!/bin/bash DATE=$(date +"%Y-%m-%dT%H%M%S") raspistill -vf -hf /home/pi/piCam/$DATE.jpg /usr/local/dropbox_uploader upload /home/pi/piCam/$DATE.jpg "Pi_Camera/"
I am wondering if this is something to do with permissions on the dropbox_loader? Help appreciated.