Hello everyone, this is Esa from Porvoo, Finland.
I have been enjoying Pimoroni products for a good while now, and I must say these are the best toys I have ever had! (I call these things “toys”, because I like to play with them, a lot :))
My dayjob as a WordPress developer takes the biggest chunk of my time, but there’s some quality time for play, and some minor time for documenting and sharing. I’m a Linux (Debian) user for over a ten years now, so I feel like home with everything Raspberry Pi.
I’d like to show you my latest camera project, built around RPi 3, a camera mount, v2 camera module, HyperPixel display, Pibow PiTFT+ case, and the inexpensive lens set, all from Pimoroni Shop:
The camera mount needed some Dremel router, (as you all know…) then a tiny drop of superglue to attach the lens screw mount, which I sawed off the clip.
As you can see, the HyperPixel display fits with the PiTFT+ case! No extra layers needed, just flip the two upmost layers:
Now, most users have certainly noticed there is no free GPIO pins using HyperPixel. No pushbutton camera then, whine! But hey, what we have here is a touch display… So, I installed Blue Dot https://github.com/martinohanlon/BlueDot
and used MockBlueDot app for controlling the local device. http://bluedot.readthedocs.io/en/latest/recipes.html#testing
I have learned some Python lately, and it was super easy to write a script that runs at bootup and takes care of RasPi camera functionality. Images could be saved into a USB thumbdrive for maximum convenience.
Here’s my script at it’s very basics:
from bluedot import MockBlueDot from picamera import PiCamera from signal import pause from time import sleep camera = PiCamera() bd = MockBlueDot() camera.rotation = 180 camera.resolution = (1920, 1080) frame = 1 def capture_camimage(): global frame camera.start_preview() sleep(2) camera.capture('/home/pi/camera/frame%03d.jpg' % frame) frame += 1 sleep(1) camera.stop_preview() bd.when_pressed = capture_camimage bd.launch_mock_app() pause()
Learn more about Pi camera settings with Python: https://www.raspberrypi.org/documentation/usage/camera/python/README.md
Now, how to implement the “camcorder” functionality?
You could modify the script to shoot a video when top of the Blue Dot is pressed, or shoot an image sequence when left of the Blue Dot is pressed! That’s awesome! What do you think?
Yesterday was a perfect day for photography, so I went testing with the macro lens from the set:
Focusing in macro photography, especially at field circumstances, is critical. Normally we would use our DSLR’s viewfinder and the focusing ring of the lens used (my personal favorite is Carl Zeiss Jena Flektogon closeup lens). With a camera setup like this, using fixed focus lens, the focusing happens moving the whole camera closer/further from the object. As you can see, in my script the camera preview is set to two seconds. That’s enough to get your subject in focus. Longer times will tire your arms and fingers, and may cause unsharp images.
HyperPixel provides incredibly sharp realtime preview with no lag or “stutter” for capturing even the most demanding objects, like insects on the move. I just wish the focus was on the spider’s eyes, now it’s about 0.5mm in front. The spider was about 6mm of length, from jaws to butt!
That’s all from Porvoo now,
thank you Pimoroni for the parts and components and stuff!