May 12, 2006
Giving RaSPy some personality
Tag, I'm it? OK, here's a quick version that I whipped up this morning. Keep in mind that Jim and I have never seen each other or even spoken on the phone, and there's nothing up my sleeves ;-). The new program has a number of requested features: it will wait until you press and release the touch sensor, and then count out loud "one, two, three" while moving the three arms forward 45° and then back (it also displays the number in a cartoon-like "speech bubble" on the LCD screen, just for fun). Then it picks a number and moves just that motor forward 70° to show which one (rock, scissors, or paper) that it picked. This time I did away with the multi-case Switch block at the end, instead just wiring the random number into a Motor block to directly select which motor to run. It waits for a second press and release (a "bump"), resets the motor that it previsouly moved, and starts all over again.
Notice that it's now up to Jim to test this program on his hardware, and perhaps make some modifications. For instance, I might have the motors running in the wrong direction, in which case he has to go in and switch the direction on all of the Motor blocks. Or he might want the arms to move faster or slower than I've set them. All of this is accessible to him, so he can play with it and custom fit it as much as he wants.
Posted by: Brian Davis at 4:22 AM