Sunday, October 24, 2010

Day Eleven?: Auto Threshold Sensing

As we get closer to our final projects, some considerations to remember is that the lighting in the classroom is not going to be the same as the ouside, the hallway, or the exhibition room.  So if some sensors are operated by the light being a certain amount lower than the 'normal' light number than they may not work in all environments.  This challenge addresses this problem.

We needed to develope a set of commands that would be able to tell if a shadow passes over the light sensor and this program must work in different environments without  changing the program each time. 

We pulled the picoblocks together and got this in the end.

We told the sciborg to look at the light when its immediantly turned on and set that value to n.  Then if the sensor increased by one hundred or more, it would beep, because it would sense the shadow. 

Our program worked well in the classroom and then it also did well in the hall.  When then took the sciborg outside.  We turned him on and didn't get the same result when we waved our hand in front of the sensor to create a shadow.  It took us a few minutes to realize we hadn't started running the program yet.  Once we hit start, it did work and we were so excited that we had completed this challenge pretty much on the first try.

No comments:

Post a Comment