repository to manage all files related to the makeathon farm bot project (Software + Documentation).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

camera_Test.py 266B

1234567891011121314
  1. from picamera import PiCamera
  2. from time import sleep
  3. from datetime import datetime
  4. camera = PiCamera()
  5. camera.start_preview()
  6. dt = datetime.now()
  7. ts = datetime.timestamp(dt)
  8. name = "/home/pi/Pictures/{}.jpg".format(ts)
  9. camera.capture(name)
  10. camera.stop_preview()