@@ -196,7 +196,7 @@ By discarding the motor and the ultrasonic sensor, we suddenly had a bit more we
Image 4: The robot after removing the ultrasonic sensor and adding touch sensors in the back.
With this design we however have another problem. We only know if have something in front of us, which is what we want, or if we have been touched on one of the three sides we do not want. Then we got the idea that we might be able to distinguish the walls from each other by small differences in the raw value from the touch sensors. This will be possible if the sensors are inaccurate i.e. the sensors do not all produce the same value, but precise i.e. the sensors keeps reproducing the same value.
With this design we however have another problem. We only know if have something in front of us, which is what we want, or if we have been touched on one of the three sides we do not want. Then we got the idea that we might be able to distinguish the walls from each other by small differences in the raw value from the touch sensors. This will be possible if the sensors are inaccurate i.e. the sensors do not all produce the same value, but precise i.e. the sensors keeps reproducing the same value. If they did, we could make an analog to digital converter [11] on our NXT, thus freeing up ports while we get all the information we wanted.
We tested all the unused touch sensors in LegoLab, and found the the raw value returned by SensorPort.readRawValue() ranged in 181-185 with readings from the individual sensor being fairly consistent. We were able to pair touch sensors to get raw values of 98, 99 and 100. It was possible to get readings of +/- 3, but most readings of the paired sensors were the same. Although detecting which bumper is pressed using the raw values, may sometimes be imprecise, it is still better than random guessing.