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.
Distance is a read-only resource that works with dpcat. The stream of data is line oriented and each line of output has a digit that indicates the sensor number followed by the distance given in units of one-tenth of an inch. A distance of zero indicates that the sensor is not connected or is not responding. Typical output from the distance resource might appear as:

     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


FPGA Defined Peripherals
User Interface
FPGA Configuration
FPGA Buttons & LEDs
Host Tx/Rx Interface
AVR Interface
Stereo Audio Amplifier
Text LCD and Keypad
Quad WS2812 Interface
Quad Slide Pot
IR Recv/Xmit
6 Digit LCD
RC Decoder
Keyfob RF Decoder
Rotary Encoder Interface
Quad Touch Interface
Motion Control
Dual DC Motor Controller
Dual Quadrature Decoder
Quad 13 Bit Servo
Bipolar Stepper Controller
Unipolar Stepper Controller
Simple Input / Output
Quad Binary Output
Quad Binary Input
Octal Input/Output
32 Channel Binary Output
32 Channel Binary Input
Quad Serial Output
Octal Serial Output
Octal 12-bit ADC
Quad Ping))) Interface
Pololu QTR Interface
Octal SRF04 Interface
Generic I2C
Generic SPI
Octal 8-Bit DAC
Quad Digital Potentiometer
Quad PWM Output
Quad PWM Input
Quad Event Counter
Real Time Clock
Dual Pulse Generator

Interface Cards
Control Cards
User Interface
Stereo Audio Amplifier
IR Recv/xmit
Six Digit LCD Display
Keyfob RF Receiver
Rotary Encoder
Quad Switch Card
Text LCD / keypad
Quad Slide Pot
Quad Touch Interface
Motion Control
Dual 7-amp H-bridge
Quad Open Drain Driver
Quad 10 Amp Relay Card
Input / Output
Octal 8-Bit DAC
Quad Digital Potentiometer
Octal 12-bit ADC
Octal SRF04
I2C Prototyping
SPI Prototyping
USB 2.0 Hub
Real Time Clock
Octal Input/Output
32 Channel Input
32 Channel Output
Power Distribution Card
15 Amp Power Distribution
5 Volt Switching Regulator
ATX Power Break-Out Card
Disk Drive Power Break-Out
MP43 Aluminum Mounting Plate
WW4 Large Prototyping Card
WW2 Prototyping Card
WW1 Small Prototyping Card
SMP SMD Prototyping Card