New Raspbian Image

I finally got around to setting up the new Raspbian image tonight. So far I'm really impressed with how well things have progressed since the debian image I had been using. There is a nice config tool to help with a lot of the initial setup stuff, although I did have to do some config.txt modifications in order to get any video at all on boot.  It even has an option to resize the partition on next boot to fill your SD card.  It's still not what I would call "fast" for things like web browsing but for the short time I've been using it, it is noticeably better than the old debian image I had.  If you're not sure about upgrading, I'd say it's definitely worth the effort.  Of course one of the great things about the Raspberry Pi is that you can just pop in a different SD card so swapping the OS is a very minor compared to other PCs. I also put it in it's shiny new adafruit pi box which is very cool.  It's a very clever design and looks cool with the board exposed and the LEDs doing their thing inside.

 

$10 Robot Platform - Part 2

Previously I posted that I had picked up a Thunder Tumbler from CVS for $10.  This past weekend I started working on making it into a robot.  Here it is with the body off and the circuit board pulled out.  The coiled spring is the antenna.  I'm not going to use the existing circuit at all but I saved it because it might be useful for something else in the future. I removed the front wheels because I plan to use it vertically.  The front wheels and/or the wheelie wheel are easily removed with just a few screws, which makes it very easy to customize to whatever configuration you want.  I also soldered some extensions onto the existing wires to make them easier to work with.

I don't have a fancy laser cutter or 3d printer so I had to find a cheap and easy way to mount and arduino, sensors, etc.  I bought a 10 pack of aluminum flashing shingles for a few dollars from Home Depot and used a pair of tin snips to cut one to size.  It worked very well.

 

I used a spring loaded center punch to dent the spots where I needed to drill holes.  This keeps the drill bit from slipping away and helps you to drill precise holes with a handheld drill.

 

 

Here is the bracket I made attached to the base.  I already had the standoffs, I've been hoarding the leftover hardware from computer cases for decades, but you can pick them up from amazon for pretty cheap.

 

And here it is with the arduino mounted.  One of the mounting holes in the arduino is too close the surrounding components to fit a screw into.  For now I just glued a cardboard washer to the standoff to keep it from shorting anything.  I may remove the standoff completely, or look into some nylon standoffs so there is no risk of shorting anything.

So far I'm pretty happy with it.  For $10 you get a base, wheels, two motors, and a battery holder.  Not to mention the wireless transmitter and receiver which are also very hackable. The base can easily be set up for a three wheeled or four wheeled robot and there is plenty of room for mounting other stuff.  I think I may even stop by CVS and buy a few more to have around for future projects.

 

$10 Robot Platform

I was at a CVS drugstore yesterday and I noticed a radio controlled car for only $10.  I'm currently waiting for delivery of a battery holder, two motors, two wheels, a caster, and some motor mounts from sparkfun, and needless to say, they cost more than $10 combined.  So I figured I'd give it a shot and buy one. The car is a Thunder Tumbler and it has terrible reviews on Amazon which is unsurprising.  As an RC car it is pretty awful.  The joysticks aren't analog so the motors are on full speed or off.  It's nearly impossible to steer and it pretty much always does wheelies and spins out.  I suppose that is the "tumbler" part of the name but the cheap plastic parts don't hold up well to the abuse.

None of that really matters to me though because I plan to strip it down and just use the motors and base at much slower speeds.  It even has a nice little removable battery tray.  I don't have any plans for the remote control or the existing motor control circuit but I will keep them around, they seem to be built with an RX-2B/TX-2B pair of chips and it could be fun/useful for some future project needing a simple wireless controller.  I'm just going to remove the existing electronics and control the motors with an adafruit motor shield.

After a little googling this morning, I find that I'm not the first person to have this idea.  You can see working examples here and here although I think I will try to use mine vertically, standing up on the wheelie wheel more like R2-D2.

Robocalypse

I've vaguely known about Arduino for a long time now but, to me, it's been almost just background noise on the internet.  I've just never really given it any attention until recently.  People invariably compare the Raspberry Pi to the Arduino and there is lots of talk about using the GPIO header for many Arduino-like tasks.  Eventually the constant Arduino noise penetrated my thick skull and I started to look into it and all I can say is it's amazing.  Things have progressed so far since I dropped out from studied electrical engineering at Michigan Tech.  I've forgotten most of what little I managed to learn in my first pass at college, but it hardly matters.  Arduino makes it easy and all the heavy lifting has already been done by people that actually got up and went to their classes. Even as recently as ten years ago I had a friend (okay not that recent but time flies when you get old) that claimed he wanted to build a robot and, at the time, it seemed pretty unlikely to me that he could pull it off (no offense Russ) but now it's crazy easy and cheap.  There is even a contest underway to build a robot for under $10.

Anyway, the point is, this Raspberry Pi of mine is likely to combine with an Arduino and I do my part to bring on the inevitable robocalypse.

Raspberry PI HDMI to VGA adapter

Update:  It seems that the cable mentioned in this post may be unsafe for your Raspberry Pi.  Use at your own risk! I've been using a cheap HDMI to DVI cable from monoprice to connect my raspi to my old Samsung monitor that usually is the second display for my iMac.  This worked fine except I had to give up my dual screen goodness that I had really come to enjoy.  The Samsung monitor also has a VGA input and it is easy to switch between two computers if one is hooked to each.  Originally it didn't seem feasible to connect the raspi using the VGA input because converting HDMI to requires more than just a simple cable.  The raspi doesn't output analog in its HDMI port so you need some sort of "active" conversion box to translate the digital HDMI to analog VGA and the general consensus on the raspberrypi.org forums was that this would probably not be cheap.  However there were some reports that a company called "Neewer" made a cheap cable that did the trick.  Apparently it has some sort of chip hidden in the dongle that does the conversion.  I ordered one from Amazon for about $15 and am happy to report that it works great.   The only thing I needed to do was modify my config.txt to set the resolution of my monitor.

config_hdmi_boost=4
disable_overscan=1
hdmi_drive=2
hdmi_group=2
hdmi_mode=58

The first two lines I had configured previously to get the HDMI-DVI cable working.  The next two lines I just copied from the wiki page about HDMI to VGA converters.  They may not have been necessary but I haven't tried it without them.  The last line is the one that sets the resolution.  You can look up the hdmi mode value from the wiki.

 

 

More Raspbery Pi Display Tweaks

This is hardly worth posting but I'm trying to make a point of documenting everything I do with my Raspberry Pi early on so... After I got the display working with the HDMI boost adjustment I've been pretty much ignoring the black border around the screen.  This is intentionally blank to correct for the overscan settings on televisions.  On my DVI monitor is serves no purpose but to waste screen space.  It is easily fixed by adding another entry to the config.txt file in the boot partition:  disable_overscan=1

 

Raspberry Pi Lego Case

I managed to make a crude lego case for my raspi.  I had originally intended to design something with the Lego Digital Designer but I haven't really had time since the birth of my daughter coincided with the delivery of my raspi.  Some projects take precedence over others.  However I did find time to stop by the Lego Store near my house when I was running some errands and just bought a semi-random assortment of bricks from the in-store Pick-a-Brick wall.  It's probably a good thing that I didn't have an actual design because the in-store selection was pretty limited and I think I would've been disappointed.  As it is, I have a functional case for now, even if it is less than ideal.  It's not really worth posting the plans for in its current state but if/when I make something better I'll see what I can do.

Raspberry Pi US Keyboard Config

It seems the Debian Squeeze image for the Raspi uses a British keyboard layout by default.  Not surprising and easily fixed by editing /etc/default/keyboard and changing the line XKBLAYOUT=”gb” to XKBLAYOUT=”us".  While you're at it you might as well run "sudo dpkg-reconfigure tzdata" to fix your time zone too. I've also found other some weirdness here and there.  There are two entries in /etc/passwd for the user "pi" but only one in /etc/shadow.  I've disabled the user for now but I really should delete it.  There is also a sudoer entry for "suse" which doesn't even exist in /etc/passwd.  Probably someone copied sudoers over from a suse box?  But why would anyone do that?  It's odd but that's what jumping on early is all about.  Lots to fix and lots to learn.

Raspberry Pi Debian Squeeze Default Editor

It occurred to me this afternoon that I could just enable internet connection sharing on my iMac and then use its ethernet connection for the raspi.  I'm still going to get the wifi dongle working but this is actually a better solution for now.  That way I can more easily swap out different SD cards for different distros and not have to immediately mess with the wifi setup each time. So the first thing I did was to create myself a user account.  The second thing I did was to make myself a sudoer.  I launch visudo and wtf... I'm thrown into some sort of crazy editor that makes no sense.  Maybe nano or something, who knows?  There is a reason I learned vi:  it's like Visa, it's everywhere you want to be.  The only editor you can guarantee is going to be on any unix box you encounter is vi (or some vi clone like vim if you must be pedantic) so why waste time learning something else?  So anyway, I poked around looking for a .bashrc or .profile entry setting EDITOR to something moronic with no luck.  Eventually my buddy Google told me that visudo on debian is compiled to use /usr/bin/editor which is linked to [some stupid editor].  To fix it simply "rm /usr/bin/editor" and then "ln -s /usr/bin/vi /usr/bin/editor" and bob's your uncle.