Useful Script to let people easily program the Pijuice and Schedule Raspberry pi happenings #1071
quitmeyer
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For our mothbox project we are programming pijuices and pis to automatically turn themselves on during certain nights of a month and automatically attract and take photos of moths
This tool will be used hopefully by many field technicians and thus asking them to do things like VNC into the pi, and adjust python scripts or even the pijuice GUI aren't really feasible for multiple reasons.
We also found a problem when duplicating images of a setup where a system is programmed to run a certain schedule: If you put a image into identical hardware, it will not run the schedule because the pijuice hadn't yet been fed the programming by the pi.
So i made a script
https://github.com/Digital-Naturalism-Laboratories/Mothbox/blob/main/Software/Scheduler.py
that reads a CSV formatted like this
and then a cron command that runs the scheduler every time the pi starts up.
The last bit of magic is that the script will search for a CSV named "schedule_settings" on any external media plugged into the pi. So if you want to change the pi's schedule in the field, you can just copy a new CSV to a USB stick, plug it in, and now the pi will load that schedule when it starts up!
Hopefully this is useful to people, and feel free to share any ways you know to make it better!
Beta Was this translation helpful? Give feedback.
All reactions