Monday, April 19, 2010

LogoChip [Challenge 5, 6]

[Challenge 5]
To detect shadows, we implemented a photocell, which detects the amount of light coming in. We used a lantern over the photocell for better accuracy. When a shadow was over the photocell, the reading was in between 910 and 940. Therefore, to count the edges of shadows, we had the count wait until the number from reading goes below and then back up above the threshold. The video below shows detecting shadow of four fingers crossing over the photocell under the lantern for two times.





[Challenge 6]
In challenge 6, we learned to use the "second wand" and applied this method to our code below in the picture. We were able to turn on and off the two LEDs separately.





No comments:

Post a Comment