The power of linking
Wow, you folks are going crazy! For a while I was limping along with 10-20 hits per day -- not too bad considering that I don't get around to posting here very much -- but in the last few days that's jumped up to the 200-300/day range!
It all started when Shawn Augustson of ArduinoFun.com contacted me about including one of my postings in his Arduino project contest. I honestly felt that mine was pretty poor compared to some of the entrants, but it sure was cool to be recognized.
From there it got picked up by MakeZine.com, which was amazing (and that's when my traffic shot up). And from there it looks like I got picked up by Arduer.com which is an Italian-language arduino blog.
Of course, it all seems to be for the 7-segment LED posting, which I think is actually a lot less interesting and technically compelling than the 555 Timer posting, but hey, I'll take it
I'm currently working on a little project involving a do-it-yourself analog synth and the Arduino...let's see if that attracts the same interest.
Hey, where'd my drive space go? (Or: How the Arduino ate my bytes)
Been a while since I wrote, but I found something interesting today that bore sharing.
I was helping a coworker out today, tracking down where all of his drive space went. I knew that Microsoft had a tool for such things -- it's called diruse and can be downloaded here) but I hadn't used it in a long time.
Once installed, it's pretty easy. Open a command window and go to the installation directory (by default it's c:\program files\resource kit), then the command looks something like this:
diruse c:\ /s /d /m /q:1000
This will give a list of all folders that are more than 1000 Mb in size.
To my surprise, I found that there were a number of temporary folders with more than that -- in one case there was a 2 gb temporary folder, filled with (drum roll) Arduino error logs!
They were located deep in a subfolder of a subfolder of my personal files (in my case it was c:\users\jeff\appdata\local\temp), and looked like "console17287.tmp" or "console430.tmp". In each directory there was a stderr.txt & stdout.txt file. These apparently capture the output of the stdout & stderr streams from the Arduino programming environment & language.
In my case, I've had some issues with serial port connectivity and there have been times where I let it sit there spitting out communications errors for a good long while...well, those were buffering up in files, and slowly consuming quite a bit of disk space.
So, if you're doing Arduino development and find yourself wondering "Hey, where did all my disk space go", remember this post. You're welcome. ![]()
Using the 555 timer as an external clock for the Arduino
The Need for an External Clock
[Update 12/30/09: I have since found out that the Arduino has hardware timers built in. They seem to be hidden away in the API and I didn't see them when I started, but I will write a little sample with them sometime soon. In the mean time, I think there are still reasons why this is a valid approach in some cases -- plus it's got a simple introduction to interrupt handling, and the 555 timer is still a super useful IC, so hopefully you'll find something useful here.]
Often when I’m programming the Arduino, I can be a bit sloppy about time handling. I’ll throw in a delay(1000) without really thinking about it. And, for the most part, that works just fine. The delay() is just to “slow things down a bit”, and I could just easily have written delay(1111) and not really noticed anything different.
There are times, though, when precision counts.
Say you’re timing something against a video recorded at 30 frames a second – even small inaccuracies can add up and pretty soon your timing is off by several frames. Or perhaps you’re recording data from an experiment and you want to record the results every 1/100 seconds – inaccuracies can skew your results. Or if you're controlling the motion of a device, inaccuracies in timing can cause your expected location to be off.
The key here is an ‘external clock’. Rather than have the Arduino keep track of when to perform the next task, you have an outside signal that says “Now!” and fires an interrupt which the Arduino responds to. If your source fires every 100 milliseconds, then 10 times a second, the Arduino will receive an interrupt which will stop any processing currently happening and immediately execute the interrupt handler. For every tick of the clock, the interrupt handler will execute.
In my case, I was looking to build a synthesizer of sorts and wanted to ensure that I would have a 8000 Hz sample rate, so I had to make sure that the Arduino would do my bidding exactly every 125 microseconds. It turns out I was maybe over-optimistic about the what I could ask of the little guy, 125 milliseconds didn’t leave much time for me to do anything between samples. But I think that if you were in the 1/500th second range, this technique would work very well.
(Intentionally) Generating a Dr. Watson MiniDump file from managed code
For many years, Dr. Watson ‘minidump’ files have been one of the mainstays of the Windows debugging arsenal. Usually generated automatically, they contain stack trace information, a list of loaded modules, and a chunk of memory at the time of the crash, and other related info to help track down errors.
Since I moved primarily to C#, I’ve had less call to dig in at that level. There are some circumstances, however, where getting a peek under the CLR at the underlying Win32 app comes in handy. One of those times came up a couple years back, and since I couldn’t find much love on the search engines, here’s a quick review of my findings. This was originally posted to an old blog at the time, but it's kind of fun and figured I'd move it over to my more permanent home. Enjoy!
Connecting a 7-segment LED to the Arduino
For a while now I'd been interested in things like networked objects and gps/location-awareness, and I think that soon enough we're going to see a lot of 'intelligent objects' out and about in the world.
I love the idea of being able to actually build something like that, but there's a lot I don't know about the hardware side of things. What little electronics I studied was long in the past; I'd done a little coding for microcontrollers, but only a little. But there was something about the Arduino that made it seem more accessible.
So my wonderful wife, who is wonderful if I didn't mention that, bought me the "Arduino Advanced Starter Kit" and the accompanying book "Getting Started with the Arduino" for my birthday. Yay!

12/27/09 12:29:44 am,