EasyManuals Logo

pitsco tetrix prime User Manual

pitsco tetrix prime
146 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #140 background imageLoading...
Page #140 background image
Description Function Coding Example
Read Line Sensor Output
Reads the digital output of the Line
Finder Sensor connected to a PULSE
sensor port. The value read is “0” when
reflected light is received (detecting
a light-colored surface) and “1” when
light is not received (detecting a dark-
colored surface, such as a line).
readLineSensor(port#);
Data Type:
port# = integer
Data Range:
port# (See note in adjacent column.)
Data Type Returned:
value = integer (0 or 1)
readLineSensor(2);
Read the digital value of a Line Finder
Sensor on digital sensor port D2.
Note: The Line Finder Sensor can be
connected to any digital port D2-D4, or
analog ports A1-A3 configured as digital
input.
Read Ultrasonic Sensor in
Centimeters
Reads the distance in centimeters of an
object placed in front of the Ultrasonic
Sensor. The sensor is modulated at
42 kHz and has a range of 3 to 400
centimeters. The value read is an
integer.
readSonicSensorCM(port#);
Data Type:
port# = integer
Data Range:
port# (See note in adjacent column.)
Data Type Returned:
value = integer (3 to 400)
Min and max might slightly vary.
readSonicSensorCM(3);
Read the distance in centimeters of an
object placed in front of the Ultrasonic
Sensor connected to digital sensor port
D3.
Note: The Ultrasonic Sensor can be
connected to any digital port D2-D4, or
analog ports A1-A3 configured as digital
input.
Read Ultrasonic Sensor in Inches
Reads the distance in inches of an
object placed in front of the Ultrasonic
Sensor. The sensor is modulated at 42
kHz and has a range of 2 to 150 inches.
The value read is an integer.
readSonicSensorIN(port#);
Data Type:
port# = integer
Data Range:
port# (See note in adjacent column.)
Data Type Returned:
value = integer (2 to 150)
Min and max might slightly vary.
readSonicSensorIN(4);
Read the distance in inches of an object
placed in front of the Ultrasonic Sensor
connected to digital sensor port D4.
Note: The Ultrasonic Sensor can be
connected to any digital port D2-D4, or
analog ports A1-A3.
Read Battery Pack Voltage
Reads the voltage of the TETRIX
battery pack powering the PULSE
controller. The value read is an integer.
readBatteryVoltage();
Data Type: None
Data Type Returned:
value = integer
readBatteryVoltage();
Read the voltage of the TETRIX battery
pack powering the PULSE controller.
Example: A value of 918 equals 9.18
volts.
Read Start Button State
Reads the state of the green PULSE
Start button. A returned value of “1”
indicates a pressed state. A returned
value of “0” indicates a not-pressed
state.
readStartButton();
Data Type: None
Data Type Returned:
value = integer (0 or 1)
readStartButton();
Read the Start button. A value of 1
means button is pressed. A value of 0
means button is not pressed.
138 Appendix

Other manuals for pitsco tetrix prime

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the pitsco tetrix prime and is the answer not in the manual?

pitsco tetrix prime Specifications

General IconGeneral
Brandpitsco
Modeltetrix prime
CategoryRobotics
LanguageEnglish

Related product manuals