-1

Here's my current Python code:

import picamera
with picamera.piCamera() as camera:
    for i in range (10):
        camera.capture("/home/pi/Desktop/newfile/newimage.jpg")
1

What you probably want to do is tell the camera to capture to a file with the number i in its filename like this:

for i in range (10):
    camera.capture("/home/pi/Desktop/newfile/" + i + ".jpg")

Your corrected code looks like this:

import picamera
with picamera.piCamera() as camera:
    for i in range (10):
        camera.capture("/home/pi/Desktop/newfile/" + i + ".jpg")
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.