Sensors

Line Sensors

The line sensors are digital infrared sensors so either return high or low which we convert to "W" for White and "B" for Black. So the data from the line sensors is either "W" or "B".

Syntax:

eBot.sensors.lineLHS
eBot.sensors.lineRHS

Example:


Ultrasonic Distance

The Ultrasonic Distance Sensors are analog so report back the distance values in millimeters (not cm)

Syntax:

eBot.sensors.ultraLHS
eBot.sensors.ultraRHS

Example:


Voltage and Current

The Voltage Sensor is analog and reports the battery voltage in Volts. The Current Sensor is analog and reports the current consumption from the battery in Amperes (Amps).

Syntax:

eBot.sensors.voltage
eBot.sensors.current

Example:

console.log('The Power consumption in Watts:')
console.log(eBot.sensors.voltage * eBot.sensors.current)

Colour Values

The Colour Sensor is Analog and reports back values for Red, Green, Blue, White and Colour Corrected Temperature (CCT).

Syntax:

eBot.sensors.red
eBot.sensors.green
eBot.sensors.blue
eBot.sensors.white
eBot.sensors.CCT

Example:


Colour Guess

The Colour Guess system uses an algorithm to distinguish colours. We have calibrated it using Norton Bear brand Cloth tape of colours White, Red, Green, Blue, Black, Tan and Yellow. So for best results use that tape. Our standard Colour Guess calibration returns the following colours: White, Red, Green, Blue, Black, Tan and Yellow.

Syntax:

eBot.sensors.colour

Example:


RFID

Syntax:

eBot.sensors.RFIDTagID
eBot.sensors.RFIDTagName

Example:


Crane Proximity

Syntax:

eBot.sensors.proximityLHS
eBot.sensors.proximityRHS

Example:


Wheel Distance

Note that this data is only available for 2WD eBots because they use stepper motors which provide accurate positional control.

Syntax:

eBot.sensors.wheelDistanceLHS
eBot.sensors.wheelDistanceRHS
eBot.sensors.wheelDistanceResetCmd.end

Example: