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!

Kernel Fun

The current linux kernel is messing with the intel graphics chip on my laptop, which consequently thinks it’s helping to run a Cathode Ray Tube, and this is less than perfect.

My options are running a 3 month old kernel, which is perfectly sensible, or using linux-lts, which is also perfectly sensible. So, I’ve gone for the third option. I’m going to have the newest release kernel and also linux-lts as a fallback. This is unusual for me in that it’s a third option that is also perfectly sensible.

However, it does rely on me not building the lts kernel with the wrong name, so as to over-write the kernel I already have. So, I’m going to be here for a while.

It would have gone a lot better if the power lead hadn’t fallen out half an hour before I typed ‘make’.

C++: Cake or Death?

Oddly happy. I’ve got a program where if I run it in the debugger, it completes, and if I run it in the command line it segfaults. This pleases me obscurely.

Yes, I’ve checked it’s the same source file and the same build. No, I’m probably not going to dig into it, I’m just going to fix it and move onto the next problem. However, I’m pleased that I can build something that breaks, because it’s a good step on the road to building something that doesn’t break.

ETA: Wasn’t finding file to make it when edited either. Now is. Still no segfault though.

K8055 USB board

I picked up one of these in the trove at Makespace, thinking it was a cheap board, and it turns out to be a nifty bit of kit I can use for testing. If it were both expensive and useless to me, I’d return it, but I have plans for it in testing Itchy. I’d like to be able to see a slowed-down schem of the Gcode, f’rex. Outputting directly from my computer to an external board is a goal, and this is a step along the way.

Making it work on Arch was not a problem. Making it work as described on Arch was pretty horrible. In fact, I failed at just about every point.

The only available package is moribund, which at least means I don’t have to keep it updated. Make Install was not my friend but I stripped out the default install path and put in the correct one, then kicked a few things around. I wish I could remember what.

Then I entirely failed to make udev play happily. USB Device. Udev. I have a USB device. Is it devicing? Is it hell. I don’t know if it is because I run k8055 and that tries to take the device – Arch does not have the usual installation paths for everything, so there could be something seriously funky going on. I think it’s just malconfigured, though. I am just as likely to have fucked up small as big.

It had the same error message when I had the wrong group name as when I detypoed, so something is finding the rules and failing to pass them. Currently I can work with sudo or sticky bit. Neither is ideal.

Arch Flotilla

My Pimoroni Flotilla kit arrived today, and I didn’t have a Raspberry Pi left in workable condition. So, I looked for a set-up that would allow me not to use one. I found a write-up on using Ubuntu and that was hugely useful.

I already had git, so I hit

git clone https://github.com/pimoroni/Flotilla-Daemon-VS.git

in my build area. The daemon is the non-GUI backing that does the hard work of talking to the USB device. It comes without all the dependencies, though. The first one, mentioned in the Ubuntu guide, is libserial. That’s in the AUR. I already had autoconf and libtool. As it happened, I didn’t need to make libserial. This is fortunate, as I found out before I looked in the AUR that pushd was not going to play nicely and I had no idea what that meant.

I also needed libserialport-git from the AUR and websocketpp from the standard repository. I found this out when the makefile borked, and each time there wasn’t a required dependency, I just found it. More than that, I needed to take out the version number in the Makefile. CC = g++-4.9 is probably not allowed because it’s not pure GCC. So, I replaced it with CC = g++ and that worked fine. I swapped OBJECT and LDFLAGS as per the Ubuntu instructions, although I don’t know if that made a difference.

Then I downloaded Rockpool, the interface.

git clone https://github.com/pimoroni/flotilla-offline

That should have run nicely with cd flotilla-offline/rockpool && python rockpool.py but as it happens I have python3 so I made it explicit: python2 rockpool.py and then I was done. Remember to click on Connect rather than waiting politely for the bar to load. You’re acting as a server on the USB connection, so although the address looks like the default, it is and it should be.

AAAAAAAAAAAAAAAAAAAAAaaaaaaaaaaaaaaaaaarch

I swapped over the old disk drive from a comprehensively broken computer into my new one, after the repair main said that the only thing he could do for it was last rites. And possibly a museum. He thought it might be a valuable antique.

So then I had a new computer and a lot of old configuration files. It’s taken me three* days** to find the right thing to delete to get myself a graphical interface again. I’d have been happier if I could have purged everything with fire. Still, I now have a better just-about-everything. Except sleep schedule, naturally.

* give or take
** A ‘day’ in this case is measured by when it gets dark not episodes of sleep. Day starts when the sun goes down.

Learn C the Hard Way – Lucky I already thought of that

Because I was remapping the keyboard, I left my terminal in root, and ended up creating an exercise as root. So later, I couldn’t amend it. Options were chown, chmod, or just leaving it there and not caring. Fortunately, I already had exercise expansions and extra credit as different files, so it didn’t affect me. However, pro-tip here; don’t do that.