2012 Posts

Leonardo!

I'm living in an LLC. It's a new program that offers Lafayette students a chance to learn about a topic in themed housing. My house, Monroe@, is technology themed, which means I can do all sorts of fun things in the name of learning!

One of our projects for the year will be automating the house's door. We all carry HID RFID fobs for access to campus buildings, and want to enable the door to respond to those phobs. All we need is a reader to read our cards, a servo to turn the deadbolt back for a second, and some brains. I have servos already, so I went to the internet and bought an Arduino Leonardo for brains, and a HID brand reader for reading.

Guess what came yesturday? The arduino! I know that the things are bashed for being overused by hobbists, but they're so much easier to use than microcontrollers in C.

I wanted to play with it, but didn't have any parts. There are a pile of leftover LED's at the house, but nothing else. No buttons, no fancy inputs, no resistors.

Vigenere

Kml Pwn-

Nyla vg s tyjw bb gwe qydb lcm wcco unyw oz r Yqtsfelv Fqcvwr.
C'd pixwfg ck szrhly yrvg om anwcxlvby a evbebfv tbrw qf cfls
vlouh denkhzf zgna. Zw qf cfe sfx whuzt nf em soeifzdz jwlh
ziru nzd tbv qwvgws sfx unyw. Ahpzil, W ooocg rhgl lcbh bb
gsy C crdr mgu, ueg Q uche sfx nvumry kkqf cmt.

Sfxzf,
Vwlye

What would you do if you saw this message in your inbox?

Space Shuttle Liftoff

The Space Shuttle Atlantis, as it lifts off from Cape Canaveral. (Still a work in progress. I like how the gantry loses detail near the shuttle's base, but want to add some smoke and fire.)

I had to crop the png image, cause the site doesn't have enough RAM to generate thumbnails of the original sketch. No detail was lost in the process. Awesome alignment suffered, though.

Hubble Space Telescope

This is the Hubble Space telescope, captured as the third shuttle mission to repair the telescope departed.

The sketch is hanging out on my door, the first of many.

The site can't make thumbnails of large images. Evidently scaling a 12MP image takes about 30Mb of RAM, and the site only has 64Mb total. Alas. (The full size pictures are cooler, but take what you can get.)

Yin-yang

I'm still looking for a decent logo. Eventually, I hope to use a stylized blue brick. That name has a story behind it, and it evokes tinkering, so I'm keeping it. (This site was Rock Lizard for a spell, cause that's what Evan and I wrote.) One idea I had before invoking the new name way a yin-yang type thing. (As the favicon illustrates, I like little mathematical graphics.)

Alpha Logic Gate Simulation

In ECE211 (that's Digital Circuits I, for those of you who don't go to Lafayette), we've been working with digital circuits. Surprising, right?

I was frustrated that I needed to draw out these complicated circuits by hand, and that the paper never gave me any helpful feedback. So I decided to write a logic gate simulator, using my favorite language for graphics, Processing.

Critical Repairs

A while ago, I found some electrical solder. I was excited. So much so that I had to hammer out something random, using parts I had on hand. The result was an adaptor that would connect my computer's 3.5mm sound output to a stereo's twin RCA inputs.

As I've said before, it worked perfectly. With one qualifier. It just broke. The 3.5mm jack I used had fairly flimsy legs, and they gave up after a few weeks of being bent back and forth.

Radar Display

XFCE (the desktop environment I use) has many neat plugins. Among them, I use a mail plugin that checks all my accounts, a mixer, and a weather plugin to grab a forecast. I'm fond of having a radar display to see what's coming my way, but XFCE doesn't have a radar gadget. So I made one.

Bitmap Oscilloscope

After drawing basic shapes on the oscilloscope (circles, lines, and rectangles), I decided to try something more adventurous: bitmaps. Since the soundcard outputs no more than 192,000 samples per second and the oscilloscope doesn't retain data for much longer than 1/60th of a second, I knew that only small images would work.

First, I needed to read images. The Python Imaging Library does an admirable job (and is free!). It works with most formats, and is capable of reading layered images (animation, for the layman). Most of my test images were GIF files, which posed a problem: GIF's are indexed. In an indexed image, each pixel has only a single value, rather than the usual three (red, green, and blue). The GIF includes a lookup table for translating that value into a color. Unfortunately, PIL doesn't include any way of running those numbers through the lookup table. Fortunately, it allows conversion to a normal RGB image.

Vectorscope

I've seen people attaching microcontrollers to 2-channel oscilloscopes to draw pretty patterns. It looked cool, so I decided to try it myself. One problem: I don't know heads from tails when it comes to microcontrollers. I can, however, program. And my computer has a sound card, capable of producing two channels of 8-bit wrath.

The process was actually beautifully sequential. I'll spare you the details of how I found a library - suffice it to say that PyAudio allows for injection of sound into a stream and reached maturity. I reverse-engineered the sound format using some of the sample recipes provided. PyAudio's streams store and read sound from an ASCII string. Initially, I assumed that the transform was based on chr(), where chr(0) corresponded to 0 volts, and chr(255) reflected maximum volume. I was wrong.

Pages