Ultrasonic distance sensor (HC-SR04) with Diddyborg

Hello
First i do say that I'm a newbie with Raspberry pi!
I have several questions about the Diddyborg!
1. Which system is better? A Ultrasonic distance sensor (HC-SR04) with servo or three of them fix mounted?
2. I will use a TFT Display (https://www.adafruit.com/product/2441). So where On the Raspberry Pi do i plug the connector from the PicoBorg Reverse? The connector side of the Raspberry Pi 3 is used from the display!

Images: 
piborg's picture

We would usually go with the three fixed given those choices.
The reasons are:

  1. You can look at multiple distances at the same time when the DiddyBorg is trying to decide where to go
  2. After moving the servo the distance reading will have a bit of a delay before it reads the correct value

There are benefits to the servo mounted sensor though:

  1. You can measure at different angles, not just a few fixed ones
  2. Combined with camera processing it is possible to 'track' an object in front to measure its distance away

To connect the PicoBorg Reverse you will need to use the GPIO header on the TFT board itself:

Make sure you attach to the correct pins on the header, pin 1 is labeled with a triangle on the PCB:

The layout should be identical to the older 2x16 GPIO standard.

Hello
Is there a script for the Diddyborg with 3 Distance Sensor?

piborg's picture

We do not have a complete example, no.

There are some basic examples that may help get you started on this thread:
Use UltraBorg to control DiddyBorg

Hello
Thanks a lot!
I have another question.
Is it possible to use an PS4 Joystick instead of an PS3 Joystick?
Whre i could find some help?

piborg's picture

If you can get the PS4 controller to appear as a joystick then it should work fine with the DiddyBorg.

We do not have any to try, but there is some help here for RetroPie that might be useful:
https://github.com/retropie/retropie-setup/wiki/Setting-up-a-PS4-controller

Hello
I could pair the PS4 but when i test it with
jstest /dev/input/js01
i don't receive real-time data!
Is this normal?

piborg's picture

The output from jstest should change as you move the analog sticks or press buttons.
Something like this:

If it is not doing that then the script will not work correctly.

We may be able to help get it working, usually the pairing is the tricky bit.

  1. What is shown if you run ls /dev/input/js*?
  2. What is the jstest command currently displaying?

Thanks for reply!
See!
Perhaps is it an usue with the onboard bluetooth Modul! I`v heard that it can be solved with a USB Bluetooth Modul...

Images: 
Attachments: 
piborg's picture

It is possible, we have seen this behavior where it seems to get "stuck" from PS3 remotes when using older 2.0 Bluetooth dongles.

The strange thing is that the PS3 remotes work fine with the on-board Bluetooth, but there are a number of people on saying that it does not work with the PS4 remotes for some reason.

There is a short compatibility list here that may help:
https://github.com/chrippa/ds4drv/wiki/Bluetooth%20dongle%20compatibility

There are also some suggestions for troubleshooting here:
https://github.com/chrippa/ds4drv/issues/22#issuecomment-36604456

Thanks for the links but it doesn't help!
I ordered now a Bluetooth Dongle, perhaps i have luck!
Greats

Subscribe to Comments for "Ultrasonic distance sensor (HC-SR04) with Diddyborg "