My Little Pi-ny

Dev Machine
Here’s the development machine. I love hardware that folds down almost as much as I love free hardware that I picked up because someone else didn’t need it, and this is a blend of the two.

Everything I have in this photo fits into the official touch screen box, along with a chunky battery and a spare USB lead for power. It’s a Pi 3 with blinkt hat, touch screen, Rii-diculously small keyboard on which yes, I genuinely type, and two Fold Holds (by Jonathan Woolf) to hold it all up and protect the screen when it’s packed. You might say the touch screen is overkill – I don’t have a GUI on the machine.

I’m going to design a hat to go on top, which will be able to fly out the unused pins currently covered by the blinkt, giving me breadboarded GPIO access. Nothing could possibly go wrong with that plan.

Clinkt

Pi Larson ScanningI may have got a little carried away.

The Blinkt hat has a perfectly* good python library which does everything you might reasonably want to do with a set of 8 APA102 lights. My problem there is the word ‘reasonably’. So, I re-wrote it in C++, because my soul has never seen the light of day.

(* nearly perfectly. Some might say that flushing the visible buffer by writing white pixels off the end of it is a little much if you decide to define the number of LEDs as 6 for testing and OW MY EYES.)

It’ll take arbitrary pixel length, just like the python library, but unlike the python library it’s built with the assumption you’ll want to make and use multiple patterns, and manipulate those patterns with regard to each other. I can cross over patterns based on whatever input I like, as long as I painstakingly craft that input and sanitise it myself.

The reason I wanted to dig deeper than the python framework was that the Raspberry Pi is my lightweight development machine. I have a laptop that fits into a box. More on that in the next post.

I’m reliably informed that it’s against the law to have a blinkt and not use it to output something something pop culture Davis Hasselhoff – so here is the Larson Scanner in use: Video 19-04-2017, 14 00 28

The C++ library is available at https://github.com/dianaprobst/clinkt. You’ll need the bcm28somethingorother library, but the README.txt has that information. If you want to use cheerlights or APIs you’ll also need libcurl.

blinktenlights

I picked up a pimoroni blinkt in a swag bag recently, and I think I should make a colour clock out of it. There’s a simple one-liner for installation of all required libraries, but it pipes to bash.

That is against my religion. I like to know for myself how I’m messing things up. I like to make sure the checksums are right. Disappointingly, I did it through aptitude, and it didn’t go wrong /at all/.

init.d/wtf

When using a shell script in /etc/init.d to start up a command, make sure you put the shell script there, and not the compiled program.

It didn’t work anyhow, so I’m calling it as a cron job on reboot, but I’m pretty sure the point still stands.

ETA: Aaah. So, there are things called runlevels, and Rasbian is based on Debian, which has them. I’m more a systemd person, so I was looking at the wrong sort of help file.

Motion Sensing

I’m trying to use a Raspberry Pi 3 and camera for motion sensing and recording. Here’s how I’ve got on so far:

  • Arch: Didn’t fucking work. motion started and kept dying. Power throttling killed the SD card.
  • Jessie Lite after buying a new SD card: wpa_supplicant didn’t fucking work.
  • Jessie Lite after three hours dealing with wpa_supplicant: motion didn’t fucking work.
  • MotionEyeOS: Required wired network to start for the first time. Walked back and forth between screens a lot. Can only alter root password through web interface. Weirdest fucking distro I have ever seen.
  • MotionEyeOS with a set-up script: May actually have fucking worked.

ETA: It fucking worked!

ZipPi: Project finished (ish)

Today I bought a new HDMI screen and connected everything up. I now have a working Rasbian computer with wireless mouse and keyboard. I’m well chuffed.

I’d like to do a lot more on it, like wire in the USB sockets on the top of the case, which isn’t horribly difficult. Right now, though, ZipPi is a functional, dedicated computer. It may be a Raspberry Pi 3 soon.

ZipPi Boot-up success

ZipPi the Raspberry Pi computer now has a MOSFET and board, and uses two case LEDs that indicate power to the board, and power to the Pi. It boots up, and we have played with it, but it needs a dedicated screen, mouse and keyboard, and a wireless dongle. I might get something with a decent antenna, or I might just get the Pi Dongle again. Those have to be extended out the back so I can close up the aluminium case and have it done. The board also has to be mounted inside its allotted hidden dead space. It works, though. And nothing burned down.