Skip to content

andyxmas/picam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

picam

#how it works:

  • function to take a photo using the raspicam
  • function to upload photo to google drive
  • call this function with a cron job

#inspiration

#requirements: gdata-python-client

https://developers.google.com/gdata/articles/python_client_lib?csw=1

google-api-python-client

Daylight

Simple function to return true if the current time is between sunrise and sunset.

Current intened use if to stop the raspberry pi cam taking photos when its dark.

Requirements

  • python dateutils to parse date string to timedate sudo apt-get install python-dateutil

Plan

  • Get sunrise/sunset times from openweathermap.org
  • Parse xml to time or datetime
  • compare time now with these times to return true/false

Further...

To avoid having to call the weather web service every time:

  • function, called daily by cron to save the xml file locally
  • adjust is_daylight to read local file instead of api call if its present, but fall back to the api call if file is missing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages