Archive for August, 2014

h1

Circle clockwise three times

August 14, 2014

I mentioned that I’m working on a Raspberry Pi project with video. It wasn’t going well.

I started with Python + SimpleCV because it looked easy and fun but then determined that frame rates of six frames per second would make it hard to show moving things. So I went a more native option: cross compiled C with OpenCV.

The problem with this path is that it feels like work.

While I strongly believe in life outside tech, I do some personal engineering-related projects. I consider the podcast my main personal project. But Element 14 has graciously been sending me hardware and the occasional check to write for them. This arrangement lets me learn new things and share my enthusiasm. It is pretty cool (zOMG, you guys, they pay me to goof off! If I whine enough, they send me even neater hardware! This is such a scam!)

But I do have a day job. Oh, don’t get me wrong, my billable hours are not totaling anywhere near 40. But I could be gardening, reading a book, writing a novel, designing my Halloween costume, or painting the ceiling; I could be doing other amusing things but I’ve opted to work on a technical project because I find it interesting. Getting paid is nice and directs my (often scattered) attention but it is not a large portion of my income (thus it is not motivation enough).

Having a project lose the joy of discovery and become a grind is not good for its prospects of completion. (Though I am excited about the end widget. But maybe it would be easier to do on my laptop. But then it isn’t embedded. Maybe there is an 8-bit microcontroller out there that needs me to do something with it. You know, my Halloween costume is likely to be pretty technical…)

Doing a project in Python on the Raspberry Pi is fun: hack it together, do a little experimentation, call it done enough, maybe revisit in a few weeks.  But it didn’t work, too slow. And then cross compiling and C felt workish, especially the starting over part. I actually had some things working in Python. I fought the evil of Linux video drivers. I learned about computer vision libraries too. It was fun in Python.

It was less fun in C. Though, realistically, I haven’t gotten to do much C, mostly build nonsense. But SimpleCV looks friendlier than OpenCV.

Imagine my disappointment to read that I can only expect ten frames per second in the C+OpenCV version. I don’t know how I missed that. It seems impossible. There is rasppivid video that is 30 fps, why can I get to something like 25? Oh, I know there is hardware acceleration and blah. blah, blah. But I want it. I want it more than they do. (Hey, you did read my Guardians review, right?)

So now I’ve found a different Python package, one with better Pi Camera integration. It is even linked from the Raspberry Pi Camera page. (Was it there before and I missed it? The idea of that makes me feel slightly insane. I looked around A LOT for Pi Camera stuff before deciding to leave Python).

The Camera Modes documentation shows some high frame rates.  The text later talks about all the interesting ways users can mess that up. And there is a section for rapid capturing and processing though I wasn’t clear that I could display them too. It would be interesting to try.

Ok, I think that, yes, I am going to restart the project but back to Python. All the paths are frustrating. But Python has the most potential for amusement and the chance that I’ll get beyond fighting tools and back to playing with gear. I hope.

 

h1

Hooked on a Feeling

August 12, 2014

I’ve seen Guardians of the Galaxy. Twice.

I was excited about the movie, I loved the trailers, even the teasers. I was pretty sure they’d taken all the good pieces and left the movie bereft of jokes. I was wrong, happily, happily wrong.

I’ve been trying to figure out why I adored GotG so much. Was it the really good plot? Was it the awesome number of quotable lines? Was it the fact that they had that meeting I have had at least once a week where a decision was made and then someone said “what? I wasn’t listening. I was thinking about something else”? (That is officially called “draxing” now, so you know.)

I love the point where one of them completely embarrasses himself, just to stall for a bit of time. I wish I was that brave. And I don’t know why I wouldn’t be. Embarrassment is not fatal. I love that he had the faith that his team would fix it.

It made me happy that at the end of the movie, the characters were relatively unchanged, except they were happier, more confident.

Let me recall my review of Thor (the first one). I could have sworn I posted a review of Thor here but can’t find it. Anyway, I thought Thor was a good movie but I found it difficult to watch. At the beginning, Thor is happy: happy to be a prince, happy to be a warrior, happy to be Thor. Then he get tricked, loses his hammer, falls in love, saves our world, goes home a man burdened by responsibilities, a dysfunctional family, and a long distance relationship. The movie was a story of a boy maturing to a man. He grew up and growing up sucked.

There is (or should be) a point in growing up where you have all this freedom and potential and energy: you can save the world and you want to but you don’t have to. It is a wonderful point. I remember the night after high school graduation as being fairly incandescent with possibilities and lacking in responsibilities.

There have been other points like that but, more often, the reward for a job well done is a more difficult job. That’s good but can get exhausting, even damaging as the difficult job becomes impossible.

There was none of that in the movie. The reward for a job well done in Guardians was the gratitude of a planet, a rebuilt space ship named after an 80s celeb, a new family, and a galaxy of possibilities.

If I could watch any movie this afternoon, it would be GotG. Again. It made me happy.

h1

Here’s how you can’t do it too!

August 7, 2014

I just cross compiled an application for Raspberry Pi: camcv combines the Pi’s camera program raspivid with OpenCV.

It took hours and hours. Not just to build the cross compilers (though that did hours) and figure out cmake and figure out what code I needed, it took hours of tweaking and fiddling to make it work.

I suppose now I’m supposed to write up how I accomplished it, so you can reproduce it, glossing over the tricky bits and making it sound like a walk in the park.

First, I must give credit to

Well, and to be fair, I’m still at Step 3 of OpenCV and Pi Camera’s instructions (of 7 (and a half)). I finally got the program to compile but I have a new Raspberry Pi board and haven’t even powered it on. Oh heck, if I’m reading step 4 correctly, I haven’t actually managed to pull in OpenCV.

I had this neat plan for what to do with the Pi, a camera (two maybe!), and a small display. But I’ve been so battered by compiling something that already existed and isn’t even really what I meant to compile anyway.

I find that many Linux projects have this exponentially expanding scope. My initial initial plan was to play with the camera in python using the actually pretty simple SimpleCV computer vision tools. But it was horrifically slow (a known issue to people who have tried the python and camera but a new issue to a newbie like me).

Worse, I don’t know cross-compiling has been truly worth it. Is multiple hours of setup worth many times two minutes of recompile time? Also, the RPi Compute doesn’t have an Ethernet port so it isn’t as easy to set up a tftp that would all my device access to the cross compiled executables without even a scp copy.

So I’m not going to give you the “here’s how I did it”… I’m not even sure how to post my trees. And I went through so many strange turns, I’m not sure my results will be useful (“and then at step 1123, spin in your chair, clockwise three times, the next cmake .; make instruction will then work”).

 

h1

Wandering Silicon Valley looking for techy fun

August 2, 2014

A podcast listener, Brian, asked an interesting question- he’s been traveling to San Jose and San Francisco for work, he enjoyed stopping by HSC/Halted. If you’ve never been there, it is very amusing. It is a warehouse where electronics go after they’ve been bought, resold, taken apart, and then resold again. It is a fun to visit, looking at power supplies from the 60s, radio cabinets from the 40s, and disk drives from the 80s. He planned to visit Weird Stuff in Sunnyvale, a similar sort of store. He asked if there were other places I could recommend checking out. My response:

***

Have you been to Hacker Dojo in Mountain View? People go there to hang out, get together at meetups, and sometimes to work. You can walk in for free and walk around asking people what they are working on. People apparently don’t mind. (I’ve only worked there once and we had a pretty strong don’t-bug-us vibe.) Being a member lets you schedule rooms and get a key to use the site in off hours. You don’t have to be a member to grab a table and have folks come by to talk to you.

There are a few hacker spaces, many of them are very friendly. I’d search for you goal zip code and “hacker space”.

There is also the Tech Shop. There is one in downtown SJ (also SF and a couple others). Tours are free, classes can get expensive. You don’t have to be a member to take classes and while you are there for the class, they usually let you roam. (You can just go in to use tools you are rated on for ~$10 or the monthly/annual fee.)  The Tech Museum is more for kids but can be amusing (and is downtown SJ so you can do that and the Tech Shop in one day).

More in the HSC/Weird stuff range, have you been to Saturday De Anza Electronics swap meet? Imagine you got to wander every electronics hoarder’s garage. Some say the people are very nice (it is one of those “if you are social, they are social” things that I tend to fail at).

It seems like there is a conference every week at Santa Clara, San Jose, and SF’s Moscone convention centers. (Seriously? The World Flash Memory Summit? Why?) These sometimes cost money but you may be surprised how quickly they’ll give you a pass if you say “I have a blog” or “I want to see what it is about so I can let my boss know”.

Is this what you were looking for? There is also meetup.com which has a ton of meetups: robots, auto hacking, ham radio, etc.

Oh, right, don’t forget to hit HRO when you are near HSC.

I’ve also found wandering the Google campus on the weekends to be nice, they have a strange set of buildings (and I like architecture). The Computer History is in Mountain View too. Make sure you see the Babbage Engine go, it makes calculation stunningly beautiful.

I don’t know as much in SF, I usually go that way for culture more than tech. But there is a ton of tech there (and meetup.com will help with finding that).

***

From his happy response, I went into more detail than expected. And, of course, he’ll be in town for the Flash Memory Summit.