Information Radiator: The Second Generation

Nov 18, 2006 22:31

You may recall that Co-worker Jess was kind enough to make a prototype build status display. Coworker Mike was kind enough to adapt Coworker Jess's design into something a bit more professional looking. He bought plastic boxen and low-power LED packages and put it all together. The lights are a bit small for the size of the box, but we were being careful to not draw too much from the parallel port. The port offers eight data pins, and we had lights in three colors, so I asked for two each of red, yellow, and green.

Until now, the software was only able to blink the current light pattern. The configurability was limited to specifying how many .75-second cycles the light should be on per off cycle. Now the program loads a file at startup that tells it what sequence of light combinations to use for any given status. A broken build, for instance, now alternates the two red lights. If the build script seems to have stalled, it alternates the two red lights with the two yellow lights. I also made it possible to tell the light script at startup which pattern it should demonstrate. Although I don't anticipate needing it to signal any build status, I'm likely to make a KITT-style sweep sequence for kicks.

So Mike dropped the box off while I was at a meeting. I plugged it in, but got nothing. Eep! The parallel port was supposed to be set with all pins on, so I should've seen everything lit up. Using a standalone power supply, Mike confirmed that the connections from the ribbon cable to the box and inside the box were fine; all of the lights lit. Mike and I puzzled over what could be wrong in the parallel port connector. Suspicion immediately fell on the grounding. The parallel port has a whopping eight ground pins. Mike was of the opinion that they should all be equivalent, so he only wired up one of them, picking one based on Jess's example. Jess had snaked the ground wire to hit a bunch of them. Mike and I marveled at the pinout diagram for a few minutes before we realized that Jess had started snaking the ground wire from the wrong end of the connector! He'd hit a ground pin or two at the end, but he had also shorted five other pins to ground in the process. With that understood, Mike was able to run a wire directly to one of the grounds and voilà, everything worked.

programming, work, geeky

Previous post Next post
Up