Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Witty pi energy manager software #46

Closed
wants to merge 3 commits into from

Conversation

imvectech
Copy link

@imvectech imvectech commented Nov 1, 2018

WHAT

011

Witty pi mini is a Uugear RPi shield capable of managing energy of the RPi together with keeping time using an embedded RTC.

https://github.com/uugear/Witty-Pi-2

We are working on a timelapse camera for river monitoring. The intention is to turn on the rpi 5 minutes every hour and take a picture. Simple as that. The Witty pi controls the On/OFF of the RPi sending zero voltage to the Pi to fully turn it off. After 55 minutes the Witty sends a electrical signal and the Pi boots up.

We've already done this using raspbian and want to use the PL camera kit instead ;D

In the recipe we also include a pythin script for the timelapse and some packages needed.

Download instructions

Generating the image will take a few minutes. Once the image is prepared, and if it succeeded, you'll see a green checkmark at the bottom of the pull request. To download the image:

  1. click the green checkmark; you'll go to a page at a URL like https://gitlab.com/publiclab/image-builder-rpi/pipelines/########/builds
  2. On this page, click the Jobs tab, next to Pipeline
  3. Click the green Passed button
  4. Click Download in the right-hand sidebar
  5. Unzip the artifacts.zip file, and also the hypriotos-rpi-camera_web.img.zip within it
  6. Use a program like https://etcher.io/ to flash it to an SD card

You'll also be able to read the output of the image generation in this window.

We hope to create a bot to report back the completed image URL in each pull request. If you can help create such a bot, please contact us at:

#16

Thanks!

@imvectech
Copy link
Author

imvectech commented Nov 1, 2018

Picture of the camera over the Anoia River near Barcelona.

21-38-20

@jywarren
Copy link
Member

jywarren commented Nov 1, 2018

Hmm, @icarito is it just taking a while for the GitLab process to begin?

Exciting!!! :-)

I wonder if this would make the Pi last a lot longer using one of these little batteries :-) https://www.amazon.com/s/?ie=UTF8&keywords=cr123a 🔋 ⚡️ 😴

@imvectech
Copy link
Author

imvectech commented Nov 1, 2018

Is it possible that importing those files to github simplifies the hole thing?
We are using the Witty to turn the camera off for 55 minutes. I suppose depending on the project, for sure the board will help making those batteries last longer ;D

@imvectech imvectech changed the base branch from master to witty November 1, 2018 21:56
@jywarren
Copy link
Member

jywarren commented Nov 1, 2018

importing those files

which files?

Oh wow i like this approach too! Ideally we can get not only this but also the entire timelapse system running from a prebuilt image.

@imvectech
Copy link
Author

imvectech commented Nov 1, 2018

the script incorporates the execution of the installWittiPi.sh script to install the witty software + download of the schedule.wpi file and the erase of the original daemon.sh and donwload of a modified one. There is an issue with witty pi and GPIO4 solved changing just a number.
After having the witty working this python script is executed on boot to take the picture. Waits 6 minutes and before next picture the witty turns the hole system down. Route of the pictures shoud be changed as it's from our raspbian tests.

#!/usr/bin/env python
import time
from picamera import PiCamera
from datetime import datetime
from time import sleep
from signal import pause

camera = PiCamera()

frame = 1
while True:
try:
datetime = datetime.now()
camera.resolution = (2592, 1944)
camera.capture('/home/pi/Pictures/%s.jpg' % datetime)
frame = 1
sleep(360)
except IOError:
print ("Error")

pause()

@imvectech
Copy link
Author

imvectech commented Nov 1, 2018

Sorry for the third commit. I didn't intend to merge branch witty into patch-1 but the opposite ;D

@icarito
Copy link
Member

icarito commented Nov 2, 2018

I'm guessing PR into master are built automatically by GitLab?
e.g. https://gitlab.com/publiclab/pi-builder/-/jobs/115498371

@jywarren
Copy link
Member

jywarren commented Nov 3, 2018

Ah ok, so @imvectech you just have to open the PR against the master branch instead of the witty branch! Or I could merge it and reopen the witty pr?

@imvectech
Copy link
Author

imvectech commented Nov 3, 2018

ok closing here and opening a new one. This is being a 100%git learning process. I'll try to install the Witty pi and try our approach with the timelapse already provided ;)

New PR #47

@imvectech imvectech closed this Nov 3, 2018
@jywarren
Copy link
Member

jywarren commented Nov 3, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants