Archive for category Uncategorized
Recently, I posted a “short” video about the CM5 lights and transcribing their states automatically in Swift. Here is a link to the github repository. I’ve just committed an update that includes and enables “Mode 5” of the LED panel, in addition to the “Mode 7” that I had before.
For fun, here’s a new histogram of the mode 5 video, which I captured on an iPad.
Also, the timeline for mode 5 (really more a function of the lighting and ipad)
What I’m sure iskunk and Mark are really after is the transcribed animation steps:
While progress with Swift on ARM has been very encouraging, there have been a few reports of people having trouble with it. This post is intended to be a step-by-step, starting with a brand-new Raspberry Pi version 2 and a freshly-made Raspian image (note that other distributions might work, I’ve only verified raspian).
Setup the raspberry pi
I expect that you can ssh to your raspberry pi (hereto referred to as raspi), and that you’ve run the raspi-config utility.
First, you need to expand the range of debian repositories in order to access the required prerequisites. To do that, edit /etc/apt/sources.list:
sudo nano /etc/apt/sources.list
and uncomment the last line in the file, which should look like this:
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
Then, you’ll need to update your repositories.
sudo apt-get update
Install prerequisite software
Once that’s complete, install clang
sudo apt-get install clang
Option 1: install from tarball
A tar of the swift installation (usually more up to date) is available from my website. You can install this in either your system root, or from another directory. I do all of my testing with it installed in the system root, and therefore things are more likely to work. However, you’re putting your system at more risk by doing that. Keep in mind, though, that you’re playing around with alpha-level software on your <$100 computer… YOLO.
cd / sudo wget http://housedillon.com/other/swift-armv7.tar.gz sudo tar -xzpf swift-armv7.tar.gz rm swift-armv7.tar.gz
Option 2: install with Joe Bell’s repo
Joe @iachievedit did a fantastic job creating a debian repository for the swift compiler and tools, and he’s hosting it in an amazon aws instance. Taking this route has some huge advantages. First among them is that they’re only updated when things are stable-ish. The version hosted at my website can change frequently, and it might even be completely broken!
Now, assuming that everything went according to plan, you should be able to compile programs written in swift. Also, you should be able to use glibc and Foundation.
pi@raspberrypi:~ $ cat hello.swift import Glibc import Foundation let now = NSDate() print("Hello world at \(now)") pi@raspberrypi:~ $ swiftc hello.swift pi@raspberrypi:~ $ ./hello Hello world at 2016-01-09 05:36:31 +0000 pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux
Not so fast
Ok, so there are some caveats. For one, it seems like the REPL is kinda broken on the Raspi v.2. Joe noticed this, too. I’m not sure what the root cause is for this one. It works on the original raspberry pi (armv6), and it works on the Beaglebone Black and Nvidia Tegra (armv7).
Also, things are very alpha-level, so expect the unexpected.
This is going to be a simple and short post. In my circles in news and twitter, there’s a lot of discussion about ad blocking (relating, it seems, to iOS9’s new content blocking features). I’ve been mulling the purpose of my blog and online advertising over the past few months, and I’ve come to the conclusion that the pittance that Google returns me for the privilege of running ads on my site isn’t worth it. Therefore, I’m going to disable all the ads on the site, which should improve load times and reduce general annoyance for the 1% of you that don’t block them anyway! 🙂
If you enjoy what’s on the site (even though I haven’t posted in a while) feel free to donate via paypal using the link in the sidebar. If you don’t feel like it, that’s ok too!
Wow. It has been a long time since I’ve written a post.
Let me say that I’ve got some good excuses. First among them is that I’m now the parent to a very young nerd in training. Let me introduce Emma Grace Dillon
Emma was born late this (2013) August, and the work involved in helping her mom with pregnancy as well as preparing for her have taken an enormous amount of time.
Also, during my lapse in writing, I’ve finished my Private Pilot’s License. I have to say, that while expensive and time-consuming, this has also been a highly rewarding experience. I started working on it when I was 15-16 years old. For my 31st birthday, my wife gave me permission to finish it up. I couldn’t be more grateful. As a bonus, she enjoys flying with me, which isn’t universal among spouses of pilots.
I’m lucky enough to come from a long (relative to pilots) line of private pilots. My grandpa was a pilot, my dad is, and now I get to be. Here’s a photo of my grandpa in a plane he once owned (1967 Piper Cherokee 140). One interesting thing about airplanes is that the registration information is public. I was able to look up the tail number, and it appears that this airframe is still flying. Amazing.
Here is a small selection of photos that we’ve taken during the last year while flying around the Willamette Valley and Oregon coast.
I have several posts lined up, so with any luck you should see many posts in the future.
This is waaay out of left field for this blog, but I’ve spent the last week or so working on this project, so I figure I should describe it.
In the list few weeks, my engine in my ride-on power has been burning tons of oil. It would smoke a bit all the time, but after a while, it would bog down and unleash a massive cloud of blue smoke. I read some forums and things online to try to get an idea of what was happening. Many people said that it was caused by the crank case breather. I figured this would be an easy thing to try. When I went to the small engine store (Willamette Saw) they said that it was almost guaranteed to be the head gasket. Bummer. I came back the next day with the engine model number, and got a new gasket.
You can see the tons of oil swirling around in the air filter housing. What I think was happening is that the head gasket leak was pressuring the crank case, which was causing the blower to expel lots of air and oil into the housing. When it overflowed, it would pour into the intake causing the huge smoke cloud. Read the rest of this entry »