Terrapin Resources

Using InO-Bot’s Sensors

Light Sensor

InO-Bot has a light sensor that reports a value for ambient light between 0 and 1. The higher the value, the brighter the ambient light.

The following command will turn on InO-Bot’s headlights if the ambient light is measured as less than 0.5.

IF (GPROP “INOBOT “LIGHT) < .5 THEN PPROP “INOBOT “LIGHTS [1 1]

Sound Sensor

InO-Bot contains a microphone that detects ambient noise levels. The higher the value the higher the noise level detected.

The following command retrieves the current noise level detected by InO-Bot’s microphone.

GPROP “INOBOT “NOISELEVEL

Try detecting the noise level when InO-Bot is in a quiet environment and when music is playing to calibrate the differences in value. When InO-Bot is moving, the microphone detects the noise of the motors so NOISELEVEL reports a higher value than when InO-Bot is stationary.

Proximity Sensors

InO-Bot has four proximity sensors: There are 4 Proximity Sensors: FrontRight, FrontLeft, RearRight, and RearLeft. The Proximity Sensors report a true or false state.

Distance Sensor

InO-Bot has a sensor between its headlights that can sense objects in its way and report how far away they are. The DISTANCE property reports the distance in centimeters from the front of InO-Bot to the nearest object. This value may be used to help InO-Bot avoid objects while moving.

The following command reports the distance from InO-Bot to the nearest object in front of the robot.

GPROP “INOBOT “DISTANCE Result: 14