Thursday, May 15, 2014

FT800 with Streaming Video

I like to check out the thrift stores in my area for one of a kind technical gems to add to my collection. A few years ago I came across a Connectix QuickCam. This is one of the earliest webcams that didn't require a separate video capture card. Due to how easy it was to install, it was incredibly popular. So much so that Logitech ended up buying Connectix out and forking the product under their own brand.

Connectix QuickCam
When I saw it in the store I really had no idea what it was aside from the fact that it was a webcam and it had a parallel port. My first instinct was that a parallel port is simply a collection of TTL lines that I could emulate with a modern microcontroller. I finally had some time to put it into action and decided to stream video frames from the camera to a Gameduino 2 and the FT800 video processor that it uses.



The results were great, aside from the low image quality of the camera. This experiment proves the concept of using an FT800 to composite motion video with other visual elements. A better image sensor would provide a really cool experience.

Keep reading to see how I did it!

Monday, April 21, 2014

2048, Embedded

Let me first get something out of the way... I am an embedded nut. I absolutely love taking a foreign piece of hardware and bringing it to life. My most recent excursion into embedded land has been with a Nucleo board designed by STMicroelectronics.

I decided to pair this board with a Gameduino 2 shield designed for the popular Arduino. I wrote a driver for the FT800 graphics processor and implemented Gabriele Cirulli's 2048 game as a first project with this hardware.

2048 Screenshot
The result is an awesome device that emulates the fun 2048 browser game (pretty closely, anyway). It will make a great desk ornament for passersby at work to gawk at.

Nucleo F4 Board
In this article I will give you a demonstration of the game and take you through some of the design concepts I have used to come up with this product. I wrote my own linker script, C-Runtime and driver library for this project and it was an awesome experience.

Wednesday, March 12, 2014

Happy 25th Birthday to the World Wide Web

I remember my family's first computer well. It was 1997 and I was an easily-excited 6-year-old boy. This rather large contraption just landed on my dining room table and needless to say, I was very curious. I remember playing Moto Racer with my Dad. I remember being amazed when we purchased our ATI All-In-Wonder Pro TV Tuner video card. We could somehow watch cable television on our PC... while browsing the web! What a wonder!

Google's Homepage on March 12th, 2014
Today marks the 25th anniversary of the creation of the web. Google has included a small homage to the beginning of the web that we know and love today on their homepage.

I decided to install Netscape Navigator to see how it stands up against the modern web. This is running on Linux Mint 16, a derivative of the popular Ubuntu. Needless to say, the results are not great. Thanks to the concept of graceful-degradation though, most of the content is still highly-usable despite being arranged a little oddly.

http://www.theresistornetwork.com in Netscape Navigator on Linux Mint 16
I tried to load a few websites that I frequent to see how well they are displayed. Read on to see more!

Thursday, January 30, 2014

Vacuum Fluorescent Display Alarm Clock

I have been working on this fun little project for the last couple of days. I ordered this VFD display from Noritake as a free sample. I am quite grateful for their generosity and I decided to put this display to good use.

I have written a driver in C# that implements a partial selection of the commands available from this display. The driver is object-oriented with property accessors used to set configuration parameters of the display.

Weather Data, Emails and a Loader Animation :]
I put all of this together into a sample application for a smart alarm clock that I would like to build eventually. The sample application gets my unread e-mail from Gmail and weather data from Open Weather Map. I am also attacking the 16 custom characters that reside in ram to display a few simple animations.

Thursday, January 2, 2014

Snow Day: Conky Configuration Time!

It is quite snowy in southern Ontario today so I spent a bit of time configuring Conky on my system. I have heard of conky before but never bothered to put any time into configuring it.

For those of you who don't know, Conky is a nice system monitoring application that runs on the root X window. This means that it sits on your desktop like Active Desktop, but better.

Mine looks good, but I have seen screenshots of some very artistic configurations.

Conky Configuration :]
Read more to see my conky.conf file!

Wednesday, January 1, 2014

3D Perspective Projection

I have wanted to write a 3D rendering engine for years and I have finally decided to spend some time on the problem. I decided to implement a simplistic rendering engine that supports the following basic features:
  • 3D Perspective Projection (far objects are smaller than near objects)
  • Triangular Polygons for Rendering
  • Simplistic Lighting Model
  • Colored Polygon Faces (no texturing)
The largest hurdle for me was getting past perspective projection. I did some research about matrix transformations and got caught up quite deeply in mathematical abstraction. It was the image below that really set my mind in motion. I decided to take a step back and use some simple high school trigonometry to solve the problem.

Leon Battista Alberti and Perspective Projection
I have spent approximately 13 hours on this project and the results so far are fantastic looking. This entire experiment has given me great insights into the way 3D geometry is rendered onto a 2D plane.

The Classic Utah Teapot :]
In this article I will show you the various steps that I have taken to render this image. I will focus on the mathematics behind perspective projection that I used to arrive at the teapot rendering above. The image is not perfect, but I am happy with the results.

Saturday, December 21, 2013

Dealing With a Stubborn Laptop Battery

I own an older model Panasonic Toughbook CF-28. I picked it up a couple of years ago for around a hundred dollars or so. It has a Pentium III 800MHz processor and 512MB of RAM, nothing to phone home about. What it lacks in performance it makes up for in its' rugged design. It is a military specification laptop that is capable of withstanding short drops, extreme temperatures and light water splashes. It also has a touchscreen. In other words, it is a fun toy.

Panasonic Toughbook CF-28
This laptop was missing the battery when I acquired it. I decided to opt for a cheap replacement available on eBay for around fifty dollars. When the battery arrived, I was quite pleased with the quality and performance of the product. I was easily able to get more than 5 hours of battery runtime out of the laptop.

This laptop is far from my daily driver and I left it on the shelf for a few months. When I came back to it the battery was expectedly discharged completely. The interesting part is that it would not accept a charge despite the charge indicator being illuminated.

I decided to disassemble the battery to investigate and was able to bring it back to life!

Fixed Battery

Friday, December 6, 2013

A Graphical Introduction to Hash Functions with SHA-2

Bitcoin Logo
Cryptography is the glue that holds together our modern society of electronic banking, web authentication mechanisms and identity verification. It is also the basis for the radical shifts in the way we think about our money such as Bitcoin.

I have been fascinated by the concepts of cryptography lately and decided to implement a cryptographic hashing function to try and better understand them. I will present the knowledge that I have gained in an easy to understand fashion. I am by no means an expert on this subject but if you have a general interest this should be a good starting point.

I have decided to implement SHA-256 due to the widespread adoption and ubiquity of this particular function. This implementation is designed in LabVIEW which is a graphical programming language. Whether you are a seasoned programmer or just interested in cryptography, this gentle introduction will be beneficial to you.