Monday, August 6, 2012

Raspberry Pi, the Second Helping

Have you ordered yourself one of these yet? No? Well what's wrong with you? They're fun. I'm going to proceed to be a really lousy inspiration for you to get one by telling you about some of the things I've done and had trouble with.

First of all I decided to stick with Raspbian as the OS simply because it is pretty far along and has a lot of support right now. In the mean time Gentoo has starting making releases, and I expect they will be another very popular option.

I dedided a good challenge would be to replace my Windows based server (previously mentioned Intel Atom in a spacious rack mount bay). The main features it would require are:

  1. Remote Music Player (accessible by phone/tablet)
  2. Web Server (HTTP, PHP, PERL, MySQL)
  3. FTP Server (FTP/SFTP)
  4. Download Server (accessible by phone/tablet)

Looking down these they all are things to be accessed remotely, and I would have very little use for a desktop environment for them. Since a desktop takes a lot of overhead I decided I should stick to the command line. And I haven't booted the desktop environment since. Fun right? No, seriously. It's fun. You just forgot. Like I did. Because most of us only crack open a terminal window every now and then when someone hasn't made a button to do something for us. Or perhaps check our IP address or something.

This also means at some point I unplugged the mouse and couldn't think of a reason to plug it back in. I replaced it with an external hard drive, which, BTW, needs to either have its own power source or be plugged in to a powered USB hub. The 'Pi doesn't have much juice on the ports.

The web server and FTP seemed like a good place to start, so I pulled in the packages for this:

sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install mysql-client mysql-server
sudo apt-get install postfix

And that was pretty much it. Apache is the http stuff, PHP is a useful programming language for web that things like wordpress run on, MySQL is database, and postfix is email (which is useful for having your pages send messages out). I made some minor adjustments to /etc/apache2/httpd.conf and /etc/apache2/ports.conf using a command line text editor, example:

sudo pico /etc/apache2/httpd.conf

(You make your edits and then press ctrl + x and follow the prompts from there. There are other command line editors besides pico, so dig around and find one you like. Or don't. I mean it's editing things with a keyboard. There probably isn't a text editor that will make unicorns shoot out of your pupils.)

Speaking of, this is where I noticed my first "oops." It turns out that the default keyboard setup is for Britain, and so my Amuricah the Keyboard had a few keys rearranged and inaccessible (*nix is hard to work with when you don't have a \, ~, or |, even if you can find they swapped # and @ to other places Plus it means you have to curse at the machine without censoring). Fix this by changing "gb" to "us" in /etc/default/keyboard. Unless you're British. In which case chortle at the yank' luddites.

A quick check by going to the Pi's local IP address from another computer confirmed I had web service running.

Next up was FTP:

sudo apt-get install vsftpd

I had to edit this one a fair amount to get users added to the system. You can find a lot of info about this by reading about VSFTPD, it's not difficult but this post is going to be long enough already.

At any rate I did manage to get it working, got permissions set on the folders that would be used, and made an alias to the web server's www directory using

mount --bind [a] [b]

where [a] = what you want to link from and [b] is where you want to link to, in my case /srv/ftp/www and /var/www respectivly. This knowledge will come in handy later when you decide you want large folder of files to not reside on the SD card.

More to come...

Monday, July 30, 2012

Raspberry Pi

There are many like it, but this one is mine.

You all know I'm a card carrying Arduino party member to the point that I buy parts in bulk to keep my per-arduino builds (for the controller part anyway) under about $7/each. That might make for another interesting topic. But the key is that they are very cheap ways to control something with a computer.

You know my nerd hairs* stood up when I heard about the $25-35 Raspberry Pi; an ARMv6 based computer that runs a Debian Linux distribution. It took a while to aquire one here in the U.S., but mine finally arrived from Newark a few days ago.

Selling points:

  • Powers off of a phone charger
  • General purpose input/output pins
  • runs linux
  • HDMI video output, capable of some pretty high res stuff
  • boots from a cheap SD card
  • USB support
  • It's a whole computer for Thirty Five Dollars.
  • 2.5Watts of power consumption (that I measured anyway)

Let me start by linking to a few important resources:

And on the note of the distributions: you load them to an SD card. Unfortunately the fancy 30Mbit Sandisk Extreme cards that I use for photography didn't work, but every other one I picked up around the house did. Get yourself a copy of 7zip and and Win32DiskImager if you are working out of a windows machine. 7zip takes care of the obscure compression formats that linux people are more familiar with (.gz, .xz, etc) and the disk imager builds an imaged SD card from a .img file. After you've cleared those little hurdles you should probably try downloading a few different distributions to play around with. It's easy and safe fun.

I did have troubles with most of them (standard linux troubles, of which we have made many jokes at the expense of others who think "linux makes a fine desktop for regular people" can include "it's easy to install! Just go to the command line and do these 15 things, then edit this file, then recompile, then...."). I had such flawless experience when messing with wireless network drivers (of which I never resolved).

It does however do a pretty good job of making me all nostalgic for the finer things of working with computers in the early and mid 90's. This is in many ways the goal of the thing. It's aimed at education of future software developers, of which I would certainly credit my having been toying around on the lovely machines of the pre Windows95 era.

Now you're asking yourself: what exactly am I supposed to do with this thing? Well if you go with  TechRepublic perhaps you should be building small satellites. But they do have some good suggestions for those not in possession of an orbital capable vehicle.

Borrowing from their list, these are the things I can see me doing with it:

  • Arcade Cabinet: We've chattered about this one many times at the house. Could be cheap fun.
  • Media Server: it does indeed play 1080p video, and there's a great distro (openELEC, available above) that is built just for that. It boots straight to XBMC and everything is handled from there.
  • Network attached things: Cameras, power monitoring, etc. Getting an Arduino on to a network is actually quite a pain. This is a good alternative.
  • Machine control: There are lots of linux based cnc programs out there, and the GPIO (general purpose input/output) on the Pi isn't much of a stretch to plug in to hardware. 
  • Telescope auto-guiding: You can get various devices from Orion and others that cost a boatload. Why? Because they mount a camera on the back of a secondary telescope and do image processing to determine if a guiding star is wandering from the field of view. There is already a 5 megapixel camera accessory on its way. This could handle that and much more (such as identifying stars from a catalog). 
  • Webserver: Whenever someone hears the word "server" they always seem to picture a ten foot tall rack mount tower with hundreds of cables dangling off like electric tentacles, possibly with CO2/Nitrogen vapor lightly rolling down the side. My home web server (which we use for all sorts of odd things) runs on an intel atom mini-ITX kind of thing. It's the least dense thing in my rack, and only a rack because it might as well sit in with the other audio toys. This may replace that with a simple Apache install. 

Things that sound like a good idea but probably are not:

  • CarPC: It sounds like a great idea, but once you factor in getting a screen you're probably paying more and getting less than wiring in an android tablet. I don't know if you've seen the quality of screens on these tablets, but they are far ahead of the liliput screens out there. It also turns out that a Kindle Fire is almost exactly a double-DIN size.
  • DIY Tablet: Good luck to ya. I do not know how they manage to build something like the Nexus 7 for as cheap as they do, so what you make is almost certainly going to be something of a novelty. That's cool and all, but of little interest to me.

So that's my opening. I'll keep us all updated as new cool things come to mind and we start building things with this new tool. Assuming I don't just regress to 1993 and start dialing in to some BBSs.

*I think those are the ones on the back of your elbows

Monday, July 9, 2012

A Summer of Alligator Hatchlings, the first out

These were the first of the season, nested deep in the Econlockhatchee Forest. Interesting fact: nest temperature determines gender. On a normal year hatchlings come 5:1 female, but this  year is different. Because this nest was buried pretty far in to the woods instead out out in the swamp, and because it was early enough in the year, this might be one of the only female clutches for this part of Florida. The open swamps like Wetlands Park didn't hatch until much later.

Saturday, July 7, 2012

A Summer of Alligator Hatchlings

This summer I've done a lot of hiking through the swampiest of swampy Florida during hatching season. I figure I'll share the cuter of the little guys with everyone starting with this lil' fella:

Wednesday, June 6, 2012

Transit of venus

Well...I got to see it. Just in this one moment through the storm clouds.

Tuesday, May 15, 2012

Feeds and Speeds

Just another little tidbit, this time from the CNC project. Because I lost some sleep over this.

So I'm milling a lot of aluminum and making a horrible mess. Kept adjusting the feed rates, spindle RPMs, and all that trying to get this silly thing to make some cuts and feeling like I was getting slower and slower and the results just weren't looking right. So finally I remembered that I don't really know much about machining and punted from the internet to see what kinds of settings other people were using.

Long story short it seems hard to find just a simple table that would get a person, you know, like in the vague area of what they should be doing. But eventually I did find some equations.

The results? I was off by about two orders of magnitude on my last attempt. And killing my bits prematurely. Here's the basic idea:

RPMs = feed rate / (number of flutes * chip size)

that's pretty rough and there are lots of variables to take in to consideration  (coolant, how much block am I actually cutting, is it a pocket, bla bla bla) but this seems like a good starting place. Re-arrange that for whatever variable you have easy control over.

The idea is simple actually: your chip size has to be bigger than the roundness of your bit (which really does always have a little bit of roundness and usually a chamfer leading to the cutting surface). Otherwise you are just scrubbing the outside of the bit against the aluminum until it wears down or melts/wears away. This is called burnishing. You might as well have loaded the machine up with a slightly roughened carbide rod instead of a proper endmill. A good size for this is 0.004 inches and up on a 1/4" bit. So I tossed together this little chart with the idea that I would be taking out 0.005 inch chips. ipm = inches per minute and all the numbers in white are RPMs for the spindle:


Now is this some kind of be-all-end-all chart? No, but it's a good place to start and a good place to see if you've really screwed up or not. You can also see some of the trouble of using bits with lots of flutes on aluminum. Aside from troubles clearing chips before the next cutting surface comes around: if your machine isn't very fast it's difficult to move forward fast enough to do more than burnish the aluminum away. 

So there's a really simple "this is the sort of feeds and speeds that make sense for milling aluminum" chart I wish I'd found really early on. I might not have been grinding away with a 4 flute 1/4" bit at 0.5ipm and 1500rpm trying to get the darn machine to settle. Oops.

Lots of really good in depth stuff is on here as well

Thursday, May 10, 2012

Information that will be useful in the future...

Typical velocities of some insects:
Dragonfly: 15.6 mph
Hornet: 12.8 mph
Horsefly: 8.8 mph
Honeybee: 5.7 mph
Housefly: 4.4 mph
Damselfly: 3.3 mph
Scorpion Fly: 1.1 mph

So that range is ~700 centimeters per second down to ~50 centimeters per second. So somehow I need a response and trigger time somewhere around 1/700th of a second for the fast guys and 1/50th of a second for the slow guys if I'm going to be predicting just where they will be at... uhm... I've said too much already...

Tuesday, May 8, 2012

What to do with an extra day?

Since both parties had an extra day and never got to meet up, what better way to end a rock climbing trip than with more rock climbing?

Stone Summit Climbing Gym, on the north side of Atlanta

This place was excellent. Sixty foot ceilings, excellent equipment, and some great climbers. In fact we even ran in to a few people from Aiguille back home!
We climbed till we couldn't.

Sunday, May 6, 2012

and about that fail part...

"More people drop out of distance races due to stomach issues than do from injury"
 Asleep, then awake, sick as a dog. The one thing I didn't test out beforehand was the prepackaged freeze dried food, and it did not agree with me at all.  This marks the coffin for productive work on the trip itself for me. At most I had a couple short climbs on boulders on the way down the mountain, but it was quite over with. We would spend the next night in a hotel.

The long way down. Mike found a super-banana.
This turned out to be a lucky break in a way; it ended up raining on the mountain the night after we left (Marcus, no tent, freezing rain might not have been so hot), and the second group we were going to meet up with had to cut short and head out early too.

Back to Neel's gap:

Neel's Gap: this place felt eerily similar to a Buddhist Sanga. Shoes hang like prayer flags from the tree outside.

We had just a couple more stops to make before the final drive home.

What remained of Mike's hands when we got to the bottom.

Friday, May 4, 2012

Night Three: Triumph and failure...

Thanksgiving is always a time of mixed thoughts for me anyway, and I should assume the same no matter where I am or how removed I may be from 'real life.' On normal years it's a time when family and friends converge. My brothers, nieces, parents, cousins, etc, as well as often those who are part of my family that I am not related to. It's also a reminder of a friend lost, who died trying to rescue a stranger from a car accident. These things happen, and it's not to us to judge them.

We gathered in our makeshift camp with our makeshift family for Freeze-Dried Thanksgiving Dinner. It was...not good. But the company was great. As the sky found its stars* I packed the astro-gear up and took another climb to the peak. This time it was clear: still below freezing, but bone dry.

So I'm sitting up there looking at the stars, trying to get my bearings. Great at knowing which way is north, and normally instantly identify all the reference stars...but I'm used to being at sea level. Even on the clearest of clear nights it's nothing like this. After trying to trace from constellation to decide which one was the north star and actually failing (well there goes my astro-cred!) I went for the simplest idea I could think of: take a long exposure sans-tracking:

Well there she is. And with that we were up and running!

Milky Way, the off season part. But wow that's a lot of stars.
And of course, part of the reason I was up there in the first place:
Orion Nebula as seen from 4500ft
Once I had decided i was frozen enough I packed it up and stumbled back down to camp.

Wednesday, May 2, 2012

Day 2

I really need to come up with some more interesting titles for posts. I'll try and make up for it with pretty pictures.

Climbing was excellent. The natural rock in this area (the infamous Blood Mountain Boulder Garden) was sharp, but not terrible. Enough to want to tape up our hands. I'm still waiting on my comrads to 
get their video stuff together from the day, because I think there was plenty of nice shots taken. I see a couple of shots have been slipped in to Marcus's Documentary Reel, but I think there's something a little more focused to come

Thursday, February 2, 2012

Night through morning...

Either the first night was the coldest by a good margin or I got a little more comfortable with the weather as things went on. Either way I'd say the 30 degree Lufama sleeping bag did not keep me warm. I ended up wearing every item of clothing I had taken with me except my shoes and I still had a miserable night. Admittedly it was probably low 20s, but it shouldn't have been so bad.

I woke up in the morning feeling less than refreshed, but after bit basking on the rocks and taking in the view I got some heat back in me and was ready to do some climbing. The view, by the way, was gorgeous:

It was time to set up and climb. After scouting around for route ideas we started to set up. I present to you a mountaintop film crew, complete with cranes and dollies: