I’m trying to take a picture with my Raspicam on my raspberry and adding a timestamp too each picture. The code that I use doesn’t however work. It gives me a syntax error at .."+%H...
I have mucked around in the code and was able too do it once, then tough the picture file didn’t receive any timestamp on it.
Does any one have any clue what im doing wrong?
#!/usr/bin/python
import RPi.GPIO as GPIO, time, os, subprocess, random
gpout = subprocess.check_output("stamp=$(date "+%H%M%S")", stderr=subprocess.STDOUT,shell=True)
gpout = subprocess.check_output("raspistill -t 1 --output /home/pi/photobooth_images/Test${stamp}.jpg", stderr=subprocess.STDOUT, shell=True)