The HACKER PORT category contains blocks that interact with devices connect to the S3 robot's hacker port. With these blocks, you can control individual hackerport pins, servos, and sensors.
This block category contains the following subcategories: SENSORS, PINS, SERVO.
The SENSORS category has a block for interacting with a peripheral PING))) Ultrasonic Distance Sensor, connected through the Hacker Port (on P0 - P5).
The Ping))) distance block returns the distance measurement between the sensor and an object located within its detection range (in inches or centimeters - set by the drop-down menu). The PING))) sensor can detect an object located between 1 inch (3 cm) and 125 inches (315 cm) away. The PING))) sensor must be connected to a digital hacker port location (P0 - P5) matching the selection on the block.
BlocklyProp blocks for interacting with the Propeller I/O pins available from the S3 Hacker Port.
The make PIN block sets the function and state of a Hacker Port digital I/O pin.
Select a Hacker Port digital I/O pin, P0 to P5.
Set the function and state with the second drop-down:
The check PIN block returns a 1 if the digital I/O pin selected is high and returns a 0 (zero) if the pin is low. It is used to read the pin as an input or to check what it was set to previously as an output.
The check analog PIN block returns the voltage (in volt-100ths) sensed by the specified analog Hacker Port I/O pin (A0 or A1)
The servo rotate block sends a signal to rotate a standard servo to the angle determined by the user. The servo must be connected to a digital Hacker Port location (P0 through P5) matching the selection on the block. The block accepts a range of 0 to 180 degrees, although some servos may be limited to 45 to 135 degrees. If an angle is out of range, the block will use the closest valid value. The Scribbler Robot will continue sending the servo signal while running block commands until the disable servo is used.
The servo disable block immediately disables the servo signal on the digital Hacker Port location (P0 through P5) determined by the user.