I like to take things apart. Sometimes they work when I'm done. I've been a member of NYC Resistor since 2010 and you can see more of my projects at

Apr 232013

A year ago Super Awesome Sylvia demoed MarioChron for the Adafruit MonoChron dekstop clock kit. It’s really neat — once per minute Mario hits the box and receives a coin, so his score is equal to the time. Now thanks to the GPL license on the code, you can carry it on your wrist with the port of MarioChron to the Pebble Smart Watch:
MarioChron, Pebble edition

You can install the prebuilt mario.pbw binary and the source is available for further hacking. Here’s a short video of Mario’s coin collecting action (the jump height has since been fixed in the source code).

The code is a straightforward port that reuses almost all of the original logic. The only change is to rearrange the screen slightly from the MonoChron’s 128×64 LCD to the Pebble’s 168×144. This involved translating the glcdClearDot() and glcdSetDot() calls to 2×2 rectangles using the Pebble’s graphics_fill_rect() functions. Unfortunately the e-paper display on the Pebble is designed for mostly static images, and updating it at 10 Hz for the animation draws far more power than a once-per-minute clock face. This means that this watch face consumes lots of power and the Pebble only lasts part of one day instead of an entire week. Perhaps optimizing the redraws instead of redrawing the entire screen would let it last longer.

Want to learn how to write your own watches for the Pebble? Sign up for the May 18 Pebble programming class at NYCR or come to the hackathon after!

 Posted by at 8:46 pm
Apr 162013

Pebble Polar Map

What time is it? It’s time to #MakeAwesomeHappen and learn to program the new Pebble Smart Watch! We’ll be teaching a three hour class on 18 May on how to write custom watch faces that work with the official Pebble SDK. The programming environment is low-level C, with no memory protection, and no emulator nor a debugger, so you’ll need to be fairly comfortable with writing embedded code or at least not afraid to debug with printf()*. If you’ve programmed a device like an Arduino you should be ok with the class. Tickets for the class are on sale for $125. The hackathon afterwards is free!

Pebble wordsquare watch

If you haven’t heard of it, Pebble was the wildly successfull kickstarter project that pre-sold over 80,000 watches. The watch has a 144×168 transreflective e-paper display, an ARM M3, Bluetooth, an accelerometer and lots of potential. MyPebbleFaces has a few hundred ideas for fun projects and many people have already programmed their dream watch faces.

Pebble class at NYC Resistor

After the class, we’ll be holding an all-night hackathon to write some new watches. Developers from Team Pebble will be here to hack with us and help answer any deep questions about the API. The hackathon is open to everyone with a Pebble and is a great chance to meet other wearable wrist-watch computing enthusiasts in New York. If you don’t have your Pebble yet or don’t want to risk your prized wristwatch, we’ll have a limited quantity of factory seconds that might not be waterproof, might have glue bubbles, or discoloured bezels or other QC issues available for $75. Tickets for the class and hackable watches are available here!

 Posted by at 9:28 pm
Feb 232013

Raspberry Pi's for sale

Raspberry Pi Model B (512 MB with wired Ethernet) boards are now available in the NYC Resistor vending machine! You can take one home during Craft Night on Thursdays or Laser Night on Mondays. Ask a NYCR member for help with purchasing these awesome embedded Linux boards if you don’t have nine $5 bills on hand since the vending machine doesn’t accept $10 or $20 bills.

 Posted by at 7:22 pm
Jan 212013

Timesquare assembly animated GIF

Have you ever wanted to wear an Arduino on your wrist and tell the time with a giant LED matrix? Then you’ll love this three hour class at NYC Resistor that I’ll be teaching on February 9th. During the class you can learn how to solder through-hole components as we put together the Adafruit Timesquare DIY watch kit, and afterwards we will extend the watch firmware to add a new feature to the watch.

This class is a great introduction to soldering and some advanced embedded programming techniques. The coin-cell powered Timesquare watch isn’t exactly a normal Arduino and is very CPU limited, so techniques for limiting power consumption, waking up from deep sleep with interrupt handlers, low voltage brownout detection and some inline AVR assembly will be discussed. If you just want to learn to solder and have a very stylish wristwatch, you don’t have to stay for the walkthrough of the firmware.


Included in the class price for every student is a pre-programmed Adafruit Timesquare watch kit and an FTDI cable for re-programming it (a $49 value). You’ll need to bring your own laptop with the Arduino IDE installed to flash new firmware onto the device if you are staying for the advanced portion of the class.

Click here to buy tickets at eventbrite!

 Posted by at 9:03 pm
Jan 062013

TRS80 + Teensy

Thirty years ago in 1983 the first tablet computer was released: the Tandy / RadioShack TRS-80 Model 100. It ran for weeks on four AA batteries and gathered quite a following. Despite the $1099 ($1399 with extra 8-KB of memory) introductory price tag, features like the built in 300 baud modem with acoustic couplers made them very popular with reporters in the field, and the built-in BASIC programming language (written by Bill Gates himself!) made them easy to adapt into various custom applications. Over six million were produced and as a result, inexpensive, used Model 100s are readily available now. Amazingly many of them still work perfectly and there is a somewhat active Club100 fan club.

TRS-80 Model 100 motherboard versus Teensy++ version

I bought one that was non-functional for $20 with the goal of replacing the 80C85 motherboard with a more modern AVR or ARM CPU. While this particular motherboard had failed sometime ago due to bad capacitors, the LCD and keyboard were in perfect working order. Thanks to the combination of the age of the design, the system’s low original clock speed (2.4 MHz) and its 5 V logic make it simple for modern hardware to drive. Moore’s Law also means that the entire motherboard can be shrunk into a PCB with almost zero chips other than the MCU. Read on for what is involved in building a new brain for your Model 100. Continue reading »

 Posted by at 7:44 pm
Dec 272012


I was inspired by Beth’s avrfid.S project to try to build a replacement for the multiple HID Prox cards that I carry for work. Her design is simultaneously a technical tour-de-force and an example of how badly we can abuse the Atmel chips. Here is the entire schematic:

There is no connection to power and ground: the chip is powered through leakage current from the input pins. The AC waveform is fed directly into the pins: the internal protection diodes rectify it. During negative parts of the wave the silicon die’s inherent capacitance maintains state. The CPU clock is driven by the AC as well and depends on the ability of the coil to drive more current than the chip when DDRB is configured to pull the pins to the same potential. It’s truly amazing that this works at all.

AVR RFID waveforms

The firmware she wrote in macro assembler is easy to understand and straightfoward, but filled the entire 8 KB flash on the ATTiny85 when compiled for HID Prox cards. Unlike the CW modulated EM41xx cards that just load the coil for thirty RF cycles to send a baseband one and don’t load the coil to send a baseband zero, the HID cards use Frequency Shift Keying (FSK) modulation. In FSK a baseband zero is sent by cycling the load on the coil for 50 cycles at a frequency of 4 RF cycles, and a baseband one is sent by cycling the load every 5 RF cycles. Beth’s code loads the coil by setting the two bits in DDRB to 1 while holding PORTB at 0, which places a short across the coil by putting both ends at the same potential.

While it turns out that my dream of automatically selecting the right RFID card doesn’t work, read on for details of how to build your own HID compatible RFID devices and some overview of the hand-tuned assembly necessary to fit the RFID timing. Continue reading »


 Uncategorized  3 Responses »
Nov 182012

A quarter past

I found Matt Joyce’s HDSP211x alphanumeric displays in the LED bin at NYCR and loved the StarTAC style. He had previously written about driving them, but using an Arduino and a shift register on a breadboard was a bit large for my goal of making it into a wristwatch.

Teensy backpack for the HDS2111 LED display

I noticed that the PDIP spacing was the same as the Teensy 2.0 and, much like my ROM dumper, hoped that it could fit on the back of the display with almost no additional wires. Read on for the “schematics” and source code details.
Continue reading »

 Posted by at 3:50 pm

Robot Army

 Uncategorized  7 Responses »
Nov 132012

Three PUMA arms

A friend recently acquired a set of PUMA 260 / RP Automation robot arms and asked for some assistance in getting them running again.

PUMA wiring harness

Unfortunately they had been removed from their previous occupation with a set of wire-cutters. Some wires were labeled, most were not. But after a few weekends with a multimeter and some oscilloscope work, we have it running again. Read on for how to bring these arms back to life.
Continue reading »

 Posted by at 9:30 pm
Oct 072012

USB mill controller and e-stop

Do you want to be able to control software with interesting things?

USB Iambic Morse Keyboard

Do you want to type text in a weird way?

WASD keyboard

Do you often need to type just the W-A-S-D and space keys?

"Hack it"
Standing desk with foot pedals

Or do you have have ideas for repurposing devices to connect them to your computer? Then sign up for the USB Human Input Device class at NYC Resistor next weekend, 14 October 2012!

The class covers writing firmware for the AVR to implement various USB HID classes, such as keyboards, mice and joysticks, using both raw USB calls and Arduino libraries. Included in the class is a Teensy 2.0, a breadboard and switches for building a simple human input device that you can take home to prototype your next gadget project. Anything with buttons, pedals, sliders or knobs can be used to make an input device once you know how!

 Posted by at 10:21 am

USB Analog Gauge

 Uncategorized  5 Responses »
Sep 172012

Badass gauges

Perhaps at your hackerspace you have a pile of “badass gauges” and want to do something with them. How about a USB interface, a laser cut enclosure and an RGB status indicator LED?

USB Gauge

Read on for the vague construction details and some software to drive random DC current and voltage gauges that you might find.
Continue reading »

 Posted by at 8:59 pm