|Demand Peripherals Robotics and Automation Made Easy|
PING4: Quad Ping))) Interface
The PING4 peripheral connect to up to four Parallax Ping))) ultrasonic distance sensors. The PING4 peripheral uses the GPIO4 card.
The quad Parallax Ping))) peripherals uses the four bidirectional I/O pins on a GPIO4 card to control up to four Parallax Ping))) sensors. Typically you would use the pin header version of the GPIO4 card and would connect +5 Volts and ground to the auxiliary power connector.
Resources for the in4 peripheral include a read-only data register and a read-write configuration register to determine which pins are monitored for changes.
distance :sensor ID and Distance.
0 1055 1 55 2 0 3 1848 0 1094
enable : enable or disable individual sensors. The enable resource takes a single hexadecimal character terminated by a newline. The LSB of the enable register corresponds to the lowest numbered sensor, sensor ID 0. A set bit enables the sensor and a cleared bit disables it. At start-up all sensors are disabled.
NOTE: ONLY ENABLE ACTIVE SENSORS. THE OUTPUT CAN STOP IF A SENSOR IS NOT PRESENT OR STOPS RESPONDING.
Enable the first two sensors and start monitoring the reported distances.
dpset ping4 enable 3 dpcat ping4 distance