over the pandemic, picked up a BrickPi3. We have an older set of Mindstorm NXT lego motors and sensors, not the newer EV3 ones, so the cpu is rather under powered.

initial notes:

  • initially planned to use a pi4, but reading the docs on power, decided to hook up an older pi3 I still had.
  • 8 rechargable batteries (NiMh) do not “quite” supply sufficient power 😦 . The system would start, and stop. Plugging in a monitor, I saw the initial color swatch, then some of the text, and the “power lightning” icon, and then it would restart… When plugged in an additional 5v adapter from an android phone, it then would boot and run. The NiMh batteries could supply power for the motors, for a short time.
  • found a portable android phone power pack, and adding that to the 5 v supply, with the 8 NiMh batteries was sufficient to get the “basic bot” rolling.
  • next project was not portable, dug out an old micro ATX power supply: FYI the Floppy/CD drive connectors have +12V, perfect!

project#2 the pen plotter from:
The Unofficial LEGO MINDSTORMS NXT 2.0 Inventor’s Guide
(our local library has an e-book version on o’reilly)

updated to connect to the BrickPi3

The atx power supply is connected to the battery pack with some alligator clips; not too robust, but sufficient for initial runs. Using sharpies and highlighters to draw, and using regular laser paper.

Some initial runs:

calibration tests. Sometimes leaving the pen down for too long, or too much pressure causes the paper to catch and tear:

Will post update with some code samples (python). here is the brickpi3 repo

Posted in tech | Leave a comment

Pinephone Megapixels vs cli ffmpeg

here is a comparison, a few seconds apart of the ffmpeg cli vs megapixels app.

not identical framing, since I think I moved the phone a slight bit between shots, but close:

just used the defaults for megapixels.

to my eyes, the megapixels is about the correct brightness, but the ffmpeg colours are closer, if darker.

Posted in tech | Leave a comment

Pinephone Camera on CLI with ffmpeg and media-ctl

Still on postmarketOS.

using bash, to call media-ctl and ffmpeg take pictures with the pinephone camera.

need to setup the camera for the resolution and format required :

media-ctl \
-d /dev/media1 \
--set-v4l2 '"ov5640 4-004c":0[fmt:SBGGR8_1X8/2592x1944@1/15]'

then call ffmpeg to record raw video to a file. Found the following settings work:

ffmpeg -hide_banner \
 -f rawvideo \
 -pix_fmt bayer_bggr8 \
 -s 2592x1944 \
 -f video4linux2 \
 -i /dev/video3 \
 -vsync 2 \
 -vframes 20 \

this sets the encoder and resolution to match the settings above; the device /dev/video3 is my phone, not sure if this is standard for all.

why 20 frames? by experimentation, found that the first few frames were not good (~5 or so). To me it seems like the system is “warming up”. Initial black or green, then lighting/colours off. So for the “real” picture, need more than just one.

then, convert the above .yuv file to a set of jpeg files with another ffmpeg call:

ffmpeg \
 -ss 0.5 \
 -hide_banner \
 -f rawvideo \
 -pix_fmt bayer_bggr8 \
 -s 2592x1944 \
 -i NAME_vid.yuv \
 -vsync 2 \
 -vframes 2 \

can replace .jpg with .png or another picture format.
-ss 0.5 skips the bad frames

Note: latest ffmpeg gave an error (2021-04-11) when run:
Error relocating /usr/bin/ffmpeg: av_opt_child_class_iterate: symbol not found

but downloading the latest source for ffmpeg and compiling worked again.

Sample, a bit dark, took it in the evening.

more camera controls: exposure, and such…

Posted in tech | Leave a comment

Toronto, Blue Jay Action Shot!

Spring is here, but the birds still like our feeder:

They do not sit at the feeder for very long, they swoop down, grab a seed and then fly off again.

Posted in nature | Leave a comment

Old laptop: 32G ram!

This week, updated ram in a 5 year old lenovo gaming laptop to run some recent games. Is an i7, 4 core 8 thread system.

The instructions for getting to the memory are on ifixit!

One added twist: That laptop’s official docs have maximum supported ram at 16G (which what was in the system). But since long out of warranty, and ram is cheap, and fairly standard, got 32G to put into it.

on reboot, the system immediately detected the upgrade, no extra config required, didn’t even have to go into bios

Now running some larger steam games, that used the swap file too much with 16G.

Here’s to serviceable and up-gradable systems, that have online service manuals!

I would recommend lenovo laptops, especially if you can catch their “super savings”, where they put their older models on sale, sometimes less than half price! Since many of them are very up-gradable, the older models can be excellent. The Thinkpad line is very well documented, especially for Linux. And if you get the “bare bones” versions (ram, HDD) you may be able to upgrade in the future, when HDD and RAM are even cheaper. Check the docs…

Also liked the fact that the power supplies across some Thinkpad and gaming machines were standardized on the connectors. (obviously larger ones need more power, but could use the big power supply with the smaller ones, so only need the largest one in the room)

The newer models now use USB3

p.s. anyone want some old lenovo laptop ram?

update: in case anyone has a similar system: the memory I have working is below
full spec, from the website I where got it:

Manufacturer Crucial
Manufacturer Part # CT16G4SFD8213.C16FAD1
Memory Type DDR4 SDRAM
Capacity 16GB
Data Transfer Rate 2133Mhz
Pins 288 Pin
Bus Type PC-17000
Error Correction Non-ECC
Cycle Time 0.93ns
Cas CL15
Memory Clock 266Mhz
Rank Rank 2
Voltage 1.2

Posted in tech | Leave a comment

Another USB-C hdmi adapter working with Pinebook PRO

Since working at home, have my “work” computer, which is an apple laptop; I also have been given a USB-C hdmi adapter/hub for that machine.

is a grey SATECHI device, which has ethernet, hdmi, 3 USB type a, sd, and micro sd card slots, and pass through charging.

Is a couple of years old, so not sure if this is the correct version, mine may be older.

Plugged into the pinebook pro, and it works!

using lsusb shows the extra info below:

]$ lsusb
Bus 007 Device 002: ID 2109:2817 VIA Labs, Inc. USB2.0 Hub              
Bus 007 Device 003: ID 2109:0102 VIA Labs, Inc. USB 2.0 BILLBOARD              
Bus 007 Device 004: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 008 Device 002: ID 2109:0817 VIA Labs, Inc. USB3.0 Hub              
Bus 008 Device 003: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 008 Device 004: ID 05e3:0749 Genesys Logic, Inc. SD Card Reader and Writer
Bus 008 Device 005: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter

Still only works at 1920x1080 when both laptop screen and external one in use.

Posted in tech | Leave a comment

homework setup

since have been working at home, have a couple of items that make things easier:

bluetooth multi device keyboard and mouse.

That way I can use the same keyboard for work and home, just by hitting the appropriate hot key.

there are various options, the two I currently use are:

mouse: logitech m585

keyboard: Keychron K2

would recommend both. These are the direct links, not via any engines. Feel free to comment on any others.

Posted in tech | Leave a comment

Pinebook Pro USB-C Dock and External monitor

Works! (mostly) woo hoo!


  • tried “regular” shipping, and took over a month; was over the December crush, but even so was a bit surprised on how long regular post took.
  • at first did not seem to work, hitting the Fn-F3 key did not do anything. Found I had to go into the settings >> Display Configuration >> select the device from the drop down DP-1, and then click >> Enabled.
  • Not working with the maximum resolution of the monitor 😦 of 2560×1440 yet, says “outputs could not be saved due to error.” will update if can get this changed.
  • monitor does not have any speakers, so have not tried any sound.
  • update on resolution: 2560×1440 does work as a primary monitor; when “extend desktop” mode enabled, gives error. So: have two 1920×1080 screens at once, or a single larger screen. Q: what is the maximum resolution of two screens?

otherwise, have just tried the regular usb ports for my mouse

for reference, software installed:

$ cat /etc/lsb-release  

Posted in tech | Leave a comment

Amazon Prime Photo “Things”

playing with amazon prime photos. Since I have prime, mostly for videos this past year like good omens and the expanse, and various old tv shows…

and admit that I have some amazon devices: Fire 8 tablet, Fire TV stick

so have installed the amazon photos app, and uploaded several of my nature pics, like the one above.

so what is it?

obviously a purple plant on the ground…

but is it:


these are some of the “things” that amazon photos puts the above image into. I assume the “hair” throws it off a bit; and the leaves could be lettuce or cabbage;

Posted in nature, tech | Leave a comment

Megapixels oddness

still running postmarket-os, manually updating with apk

found that the megapixels app, is now fast, but is not saving the .jpg files correctly on my setup?

is saving two files, IMGYYYYMMDDHHMMSS.dng and IMGYYYYMMDDHHMMSS.jpg

the .dng file seems fine, but since ~20201214 the .jpg is red and squished/half?

manually converted the raw .dng to jpg, and is ok, see below for an example.

the program to convert was using python3 on the phone, using python3 and the rawpy module, below almost verbatim from the example

import rawpy
import imageio

path = 'in.dng'
with rawpy.imread(path) as raw:
    rgb = raw.postprocess()
imageio.imsave('out.jpg', rgb)
Posted in tech | Leave a comment