Morgan Gangwere

About Morgan Gangwere

Morgan is a developer, insane person and general lackey of the internet.

Inter-space (re)build: Asteroids

Long ago in a space far, far away, the Quelab crew had a means of amusement: Asteroids.

A donation from Adric, the Asteroids cabinet has seen its fair share of hands across its buttons: life at, presumably, an arcade and then later at Southwest Cyberport, it was brought to Quelab after it just didn’t have any more go in it. Never one to give up, we replaced the required parts, added a high score save kit, and pounded out more hours on it, racking up high scores in the 15,000 range. Some time later, we moved, and the cabinet stayed dormant: Nobody really wanted to play it much anymore. The buttons had been abused and left in a sorried state, dust had crept in, and the final straw came when a known issue with contact corrosion had made the board unable to boot again.

That is, until someone decided to fix it. Morgan G. (myself) and Ben L (of Black Lodge Research in Redmond, WA) decided to dig in and, over a weekend, get the thing up and going properly. Some preliminary work had gone into getting it working again.

So, what needed to happen? Just some cleanup, love, and a bit of attention. New fuses, cleaned contacts, and lots of reading schematics later made it clear what the problem was, and some new features we could add in for fun, and a beautiful, well-loved cabinet was given new life.

We left a note to anyone who opens the cabinet up in the future, as well as a copy of the manual, reproduced in true Atari form, plus some spare parts.

The root cause of the cabinet not working is a well-documented flaw in power supplies that use a sense line: the sense line needs to be really good in order for the whole thing to work, and if it isn’t, there’s a good chance the PSU will just cause problems. In an ideal world, they’re self-regulating; From an EDN article on the topic:

The remote sense function automatically increases the output voltage at the output terminals of the supply to compensate for any unwanted voltage drop in the output cables with heavy load currents. Likewise, the remote sense function decreases the output voltage of the supply when the required load current is reduced. In some applications, the power supply’s output needs to be adjusted by the user to voltage higher than its nominal (e.g. 5V nominal, adjusted to 5.5V). Always adjust the power supply’s output while measuring the voltage at the load.

The EDN article concludes saying these are only really useful in extremely high load environments (read: not the environment that Atari had been building for) and should be avoided in newer designs. Perfectly reasonable in Atari’s days, but we’ve learned new things about how the world works. It’s bad enough that bypass hardware exists for these since a bad sense line can cause insane voltages (40-80V!) when they go bad.

Last-minute Arduino class buyers guide

[Edit: Arduino class has been rescheduled to Saturday March 21 due to shipping delays from winter superstorm Thor, if you are registered on Eventbrite you should have already received an email about this schedule change, and you are still registered to attend the event on the new day of Saturday March 21.]


This coming Saturday, we’re having an Arduino class! Some people don’t have an arduino though and didn’t order a kit with their ticket (or found out about it late.) For those of us who are willing to throw some money at the problem, here’s a few options! These are all available with Amazon’s 2-day prime shipping. You can get overnight shipping and, if you’re super desperate some have same-day shipping. (more…)

Giving new life to a Segate DockStar

Or, how I learned to hack things.

We at the Lab had a Segate DockStar kicking around, taking up space. I had been looking for a tiny NAS to run some home storage things, so a donation to the kitty later and away I go. However, I couldn’t put my 2.5″ PATA adapter onto it stock, so it needed a new home. That home happens to be sandwiched between some slabs of Inventables plexiglass. I’m kicking myself for not taking more pictures, but the overall design is pretty simple: Two sheets of plexiglass.

Demoscene hack with the ChipKIT 9

A while back, We got a ChipKIT box in the mail. Hmm, I thought: What could I do with such an interesting little device? I was mentally gone the entire month of november, due to working a major local event. So, after coming back to my senses I asked “What’s the catch?”

The catch was “Do something awesome.” I was always fascinated by the old Amgia/C64 Demoscene and have always wanted to nudge something cool out of myself. Well, I did, and its kinda cool; I just finished it to a nice, polished place this morning and got a video up on youtube this morning. There’s some neat things in here: the “starfield” is really a moving graph that uses some fancy trigonometry to make pretty pictures.

A touch of afterthought: The audio was overlayed by myself. I currently have some small plans to play audio on the board though.

Video in action

Help! My GCode is borked! 1

Do you have prints that don’t print?A pronterface that looks wrongterface? Well, you might have a bad mesh.

I ran into this when attempting to slice a whistle from Thingiverse: Slic3r would give me the ominous “Non-Manifold mesh” message and the printer would spaz out.

In order to undertand what’s going on, there should be a little information on how tools like slic3r work. Slic3r and other G-code generators tend to work on the values of face “normals” — the direction the face, well, “faces.” Let’s take our whistle for example: As downloaded from Thingiverse, it looks like this:

Bad STL file from Thingiverse

The tool I use is ModuleWorks STLView (also for android!) which allows us to show the face normals (green lines) and faces which face the wrong way (gold surfaces). Slic3r will produce some very, very strange GCode for this model:

Ugly GCode as a result of bad mesh

The tool here is the RepRap GCode Simlulator from source is included, and depends on openGL. This lets us see what the actual path for each layer of the model looks like.

So what do we do? First: don’t panic. Most of the horrible problems with ugly looking meshes can be fixed — all it takes is some time with the NetFabb cloud service. NetFabb produces a commercial 3D printer, but also runs a cloud service at which allows you to upload STL meshes and download the fixed version.

Here’s what the model and resulting GCode look like afterwards:

Fixed, good model with all its normals pointing out

Good GCode as a result of a clean mesh

Getting started with the STM32F4Discovery 1

If you follow the Hack-A-Day stream, you’ve probably seen the STM32F0Discovery board come up on occasion. I have two of these boards and I like them — they have what I need for basic stuff, but I wanted some more horse-power (and USB Host.) Quickly, to the STM32F4Discovery!

The target here is people who’ve outgrown the world of AVR and need something running faster; you should be capable and comfortable with diving into your PATH, mucking with environment variables and reading some pretty deep C.

STM32F4 Discovery board (From ST)

STM32F4 Discovery (From ST)

I was given one of these for xmas a little while back (read: 8 months ago) and played with it, getting demo code to run on it. ST did something very painful and/or clever in that they produced this board, for hobbyists, but conveniently forgot to point to a clean, unadulterated compiler.


Nook Color modification for Fun And Profit

We know the story. The Nook Color from B&N is pretty fun and awesome. But its not a real Android device ’till you have the full Android experience.

I know how that feels. I got a Nook to replace a tablet that died. so far, the Nook has proven to be one of my favorite tablets yet. But following the CyanogenMod instructions left me wondering what I was doing wrong — Why wasn’t I getting a nice little “thank you!” message? Well because B&N changed some things. Here’s what I had to do to get a real version of Android running on my device:

Standard Disclaimer Applies: I am not responsible for you bricking your device, the device blowing up in your face or the entire planet deciding you don’t deserve to breathe. The following is presented as-is. Neener^3. 

What you will need

  • (1) 1GB+ MicroSD card (that you can loose the data from)
  • (1) microSD card reader
  • (Windows) Win32DiskImager (I can’t help you find that)
  • (Linux/Mac) dd

Extra Data

  • CyanogenMod 7 for Nook Color (“Encore”) — Stable is fine
  • Google’s Applications for Android 2.3 (CM7) as an update zip
  • DizzyDen’s CWM Images (Choose the one for your SD card size)


  1. Clear/Deauthenticate/Erase all the data on your Nook. THIS STEP IS IMPORTANT. If you don’t, you’ll run into some STRANGE problems having to do with the main environment.
  2. un-gzip the CWM image you downloaded (if you haven’t already) as this will be pushed directly to your SD card.
  3. “Burn” the image to your SD card. Under Windows, select your SD card in Win32DiskImager and select the CWM image. Under linux, recite the following in a shell: dd if=(image name) of=(sd card device, e.g. /dev/sdb, /dev/sdq, etc.) bs=1M ( keep in mind here that the device may have been mounted before. If you get an I Can’t Let You Do That moment, find what is mounted on the SD card and unmount.
  4. Mount the SD card and create a folder called “update”
  5. place the CM7 file in that folder and the GApps zip.
  6. Unmount/Sync/Safely Remove the SD card. THIS STEP IS IMPORTANT. If you don’t make sure ALL of the two Zips are palced there you will get a message saying “HEY YOU DIDNT DO THAT RIGHT”
  7. Power off your Nook, 110% off.
  8. Insert the SD card and plug the Nook in. This should bring up a Skull And Crossbones “LOADING” screen.
  9. Select “install update from zip on SD card” (or something like that) using the Nook button
  10. Navigate to update/cm7-….encore….zip
  11. select Yes from the field of No’s
  12. Wait.
  13. Select “install from SD card”
  14. Select the gapps zip
  15. Tell it yes
  16. Remove the SD card and select “reboot device” (If you don’t, you’ll be sent back into CWM)
  17. Enjoy!
  18. Optional: Format the SD card (in Android or on Windows) and use it.
  19. Probably a good idea: install CWM (ClockWork Mod) Recovery to the device via apps drawer -> ClockworkMod -> Install ClockworkMod -> Nook Color.

If you experience problems with the interface (it happens sometimes) try clearing the data off the device. There are some cases where there is lingering content from B&N that causes it to freak out.

Now you’ve broke it!

If you want to return to the original, stock Nook image, you can go back to 1.2 thanks to our good friends at XDA-Developers. The two versions there will either flatten over CWM or leave it alone.