Step 10Finishing Up
When putting the chip in, the #1 pin goes to the side of the chip socket that was trimmed away (opposite to the side the button is on).
Hopefully you figured out how to program a chip. If not, head on over to LadyAda's place (http://www.ladyada.net/make/usbtinyisp/).
I wrote a test program to verify Buggy's operation (Buggy44Test.hex in the zip file below). It will flash the LEDs briefly (both colors if bi-colored), make a chirp on the speaker, and then flash codes out to indicate the sensor readings. Count the green flashes (or high tones) for each digit. A zero is a red flash or low tone. There is a pause between each digit. There is a longer pause between the readings. Visible light is first, followed by IR. It then repeats. If you have single colored LEDs, the tones are all you have (single color LEDs flashes same as red, so you probably wont see much)!
For the sensors readings, you are looking for a number between 0 and 255. Visible room light should put you mid-range, say 70 - 120. Dark is about 30. Bright direct light will likely get you a blinding 255!
As for IR in ambient room light, you are looking for something on the low end, say < 30. If you hold it up to an incandescent or the sun, you should get higher. If you get zero with an incandescent, something is wrong. For me it usually means I switched the emitter or detector or put the detector in backwards (no, say it isn' so).
These values are all fairly arbitrary, and depend greatly on the sensors and resistors you use. Every one I have built has had a different response. I tried to optimize the design for room light, but then again, I am an amateur. Hack at will and let me know what you come up with.
When you are satisfied, load the real program and give it a test. Use Buggy44biColor.hex if you have bi-colored LEDs. Use Buggy44oneColor.hex if you have a single colored LED. Getting the chip out is a bit of trick (see picture 2). Always take the battery out first to avoid shorts or damage to the chip.
BuggyCode.zip23 KB| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|



















































