I’ve always had to deal with the fact that printf() is missing from the arduino environment. I would have to come up with these huge blocks of code consisting of multiple Serial.print() commands to put together a simple message. Well, no more! It seems that printf works just fine, and for some unknown reason, it’s just not used or talked about.
In order for it to work, you only need to specify a target for STDOUT by adding this function..
int my_putc( char c, FILE *t) {
Serial.write( c );
}
and inside the setup() function you need to point to that function
void setup() {
…
fdevopen( &my_putc, 0);
}
That it! Now printf() works!
Serial.println("START");
fdevopen( &my_putc, 0);
printf("hello, world!");

Why this isn’t documented, I have no idea!
Electronics, Software
arudino, printf
So every night around midnight, my hard drive goes nuts and my computer slows for a few hours. I then start killing processess in the hopes of tracking it down, but I’ve been uncessfull till tonight. Tonight, I found two new tools to help debug said issues. The first is a monitoring tool that lets you see what your computer’s hard drive is doing. Check this out for information on how to use it.
My problem turned out to be something called system restore that goes through your entire harddrive looking for changed files to make copies of. I think it’s an attempt to replicate some of apple’s time machine technology. Anyhow, I’ve never used it, and it’s been pissing me off every night that I’m on my PC. I then found this post which describes how to modify the task (as well as see what other scheduled tasks you have on your system). By default it runs at Midnight and 30 minutes after you turn on your computer. Lame. I removed the entry for it to run after bootup and changed the daily run to 5AM. I figure that when it starts running, it should be a sign that I should go to bed. The more I learn about windows (vista) the more I want to go to redmond with a big blade and start stabbing developers.

Software
annoyance, scheduler, system restore, task, vista
I upgraded my network connection to Gigabit Ethernet and ran some tests which revealed that I had NO speed increase going from 100-mbit ethernet to 1000-mbit ethernet – both came in at 8MB/s. My tests involved timing the download of a large file from a linux server sitting next to the switch. I plugged in my Mac laptop, and the file flew across at 50MB/s. I asked one of my networking friends, and he pointed me to this article. It turns out that Vista purposely caps network traffic because there is a chance that the network traffic might make your audio playback skip if you have a really slow computer. I thought it was too stupid to be the culprit, but I tried it out. Sure enough…

Red – before registry tweaks to turn off audio throttlling service
Green – After following instructions in the link
Yellow – Theoretical Maximum
Personal, Software
bandwidth, gige, networking, vista
I’ve been heavily neglecting my photoalbum code, so I’m starting to do some cleanup as well as to add some Web 2.0 tidbits into the mix. I’m going to be gutting it some more, removing multi-user support, cleaning the interface, and hopefully be able to start adding more content to the site shortly.
I did find greybox, a good “lightbox” script.. I would like a few small teaks, like the ability to click on the photo to go to the next one, and the ability to move the title bar from the top to just below the photograph. I would also love for it to preload the next photo. Otherwise, it avoids the annoying resizing delay when your going from one photo to the next – which most lightbox scripts use – which I hate.
I also want to give a shout out to Richard Hesse who was insisting that a fast HD was key to a fast computer. He was right.. I upgraded to the velociraptor 300G HD and it balzes. Well worth the expensive sticker price.
Personal, Software
greybox, lightbox, photoalbum, web2.0
I’ve not been maintaining my web pages, especially given that CMSMS’s bugfix resulted in my friend’s computer being hacked by A) some IRC people who installed bot software and B) some people that tried to use my friend’s computer to hack into some FBI site. *grumble*
The worst part is that I followed the upgrade instructions as documented in trying to fix the hole, but there was no mention of removing the depreciated file with the vulnerability. Shame on you CMSMS. That’s when attack B happened. *grumble some more*
Anyhow, I just wanted to post this to save some people the headaches that I suffered about a year ago when we fixed some bugs in dosfs. Although I submitted the bugfix to him about a year ago, and again a month ago, he seems to have stopped maintaining the code. So, here’s the fix. It’s mostly based on initializing variables and (more importantly) a fix in the seek() code by John Canny, my advisor. Anyhow, here’s the patch.
Software