So, you may be wondering what terrible disaster has struck to prevent me from posting the fabulous updates to my motorized Lego car. (If you weren't before, you are now.)
Well, I got the microcontroller working via the serial interface. I wrote up a c++ program in Linux (I do all my c++ programming in
Ubuntu because of it's built in c compiler) to send serial data to the microcontroller. This worked well, but took a bit of diving into header files and strange structures to get access to the I/O modules I needed. Using the USB port is easier in Linux because it's addressable as '/dev/TTYUSB0'. So, I decided to try it out in Windows. In windows, it's just a bus (USB = Universal Serial Bus), and the individual ports aren't addressed. But, COM7 showed up when I plugged in my USB to Serial converter cable installed the driver for it. I was able to get it working with Visual Basic 6 with only 2 lines of code. Ha ha, how lame is that?
I had gone down to DI (yes, the thrift store) and bought some old DC power supplies. You know... the bulky transformers used for cell phone chargers or power for computer speakers. I had these hooked up to power the motors with an H-Bridge because the computer can't supply enough current to drive the motors. So, the computer just toggles the voltage at the base (or gate) and switches the high-current DC power supply from the wall.
Just as I got started playing with the serial interface, the unthinkable happened...
Turns out I burnt out one of my 98¢ DC power supplies. I guess they really meant that whole 150 mA rating stuff printed on the back.
I guess it could have been worse. It could have tried to source (or sink) the current through the parallel port on the computer and zapped my motherboard. I guess this is an acceptable alternative.
Now I need to make another trip down to DI and be a little pickier about what random part I buy. Hopefully some ignorant LDS sap has unwittingly discarded the exact part I need. You know what they say, "One man's heavily-used, refurbished, and resold-at-a-discount-price hardware is another man's high-current electronics hobby."
In the meantime, we're busy packing up the house so that we can move. So, I have to pack up my hobby project for a few days. Hopefully I can find it after we unpack the boxes when we get there. We've been dropping off a truckload of boxes every time we drive over, so we've gotten a head start. At the same time, we've been helping Mom and Dad move things around in preparation for us to move in there. On top of all that, we're moving the same week as the
Turnidges. Yikes.