DiddyBorgRed with Pi Zero

I normally use a Raspberry Pi B+ with my DiddyBorgRed, although I believe that the Pi Zero would save space on my robot, plus it means my B+ can be used elsewhere. I was wondering if there is anything extra I have to do to be able to use the zero. This is because I have attempted to power the zero with my controller attached and it does not seem to work.

piborg's picture

Both the normal DiddyBorg and the Red Edition should work fine with the Pi Zero.
I am guessing the trouble you are having is connecting a PS3 controller to the robot.

The Bluetooth behaviour for the PS3 controller is a little strange.
The Pi itself (on the SD card) needs to be setup to trust the controller, at the same time the PS3 controller needs to be configured for the Bluetooth dongle used.

I would suggest going through our setup instructions for PS3 controllers on the Pi Zero itself.
You will need a USB hub of some kind as both the PS3 controller and the Bluetooth dongle need to be attached at the same time at one stage.
The instructions can be found here: PlayStation 3 controller help sheet.

ojd233's picture

Currently I am not using a ps3 controller I am just using a wireless controller. Also I tried the DiddyWeb script and it wouldnt work either. Is this something to do with my pi? I will try the controller setup as wealth see if it helps

piborg's picture

It might be that the I2C driver for the Pi Zero is not enabled.

First try re-enabling I2C using raspi-config:

  1. Enter the following command in a terminal: sudo raspi-config
  2. Move down to option 8 Advanced Options and press ENTER
  3. Move down to option A7 I2C and press ENTER
  4. Make sure Yes is highlighted and press ENTER
  5. When the dialog says I2C is enabled press ENTER
  6. Make sure Yes is highlighted again and press ENTER
  7. When the dialog says I2C will be loaded by default press ENTER
  8. Move right until Finish is highlighted, then press ENTER
  9. If asked let the Raspberry Pi restart, otherwise use the command sudo reboot to restart

If that still does not work try re-running the install script, it also does some I2C setup and may fix the trouble:

cd ~/diddyred
./install.sh
sudo reboot
ojd233's picture

I ran the script on python just now and the error message explained that the PiciBorgRev could not be found at address 44, which I'm assuming is the set address for PiciBorgRev. Would this cause the joystick to not respond.

piborg's picture

Yes, the error is saying that the script failed to talk to the PicoBorg Reverse.
As it cannot control the motors in that case it gives up and stops running.

What result do you get from running this command on the Pi Zero:
sudo i2cdetect -y 1

ojd233's picture

I get a table the goes from 0 to f on the top and 00 to 70 along the side. The table is mostly filled in with dashes apart from 0,1,2 on the 00 row and from 8 to f on the 70 row

piborg's picture

It sounds like nothing shows up, like this:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Are there any letters or numbers at all in place of the -- symbols?

If not the most likely problem are the 3-pin cables between the Pi Zero and the PicoBorg Reverse.
I would double-check they are both connected as per the instructions.

If they are correctly connected then try replacing the the cable connectecd to pin 1 on both boards.
This step in the build: Red Edition: communications cable.
We usually put a spare in the kit.

ojd233's picture

Yes it looks exactly like that. I looked at the wires going from the PicoBorgReverse to the pi and they looked good. I also changed the wire but that made no difference. The only thing that I can think of is that I'm using the exact same memory card that I have been using for my B+. Is there a different way that the zero is set up.

piborg's picture

It is possible that there may be some updates to Raspbian that you need, we have seen that kind of problem with the camera module before.

First try the standard updates:

sudo apt-get update
sudo apt-get upgrade
sudo reboot

If that does not do the trick try a full update:

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
sudo reboot
ojd233's picture

Sodo apt-get update failed to download some packages. Rpi update could not install, because I think because my time is five hours behind, and it won't change. And dist upgrade worked.

piborg's picture

If it is still not working then there are two likely culprits:

  1. The I2C connection to the board
  2. The software on the SD card does not quite work correctly with the Pi Zero

Problem 1 is more likely, but harder to fix.
What we need to do is determine which part is at fault.

Can you take some photos of the connections between the Pi Zero and the PicoBorg Reverse?
Also some photos of the pins soldered to the GPIO on the Pi Zero from the top and bottom of the board would help.

Problem 2 can be fixed be downloading a recent copy of Raspbian and writing it to the SD card.
This will require everything to be reinstalled, but it will remove any doubt of software trouble.

ojd233's picture

Here are the pictures

Attachments: 
piborg's picture

The wiring all looks correct, I cannot see any problems with the GPIO pin soldering either.

Since this was working with your B+ before I would suggest we try and use WiringPi to see if the Pi Zero has faulty GPIO pins.

First disconnect both of the wires from the GPIO.

Next download and build the WiringPi code:

cd ~
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

After it has built run the GPIO pin tester:

~/wiringPi/gpio/pintest

You should see some diagnostics after pressing ENTER:

PinTest
=======

This is a simple utility to test the GPIO pins on your Raspberry Pi.

NOTE: All GPIO peripherals must be removed to perform this test. This
  includes serial, I2C and SPI connections. You may get incorrect results
  if something is connected and it interferes with the test.

This test can only test the input side of things. It uses the internal
pull-up and pull-down resistors to simulate inputs. It does not test
the output drivers.

You will need to reboot your Pi after this test if you wish to use the
serial port as it will be left in GPIO mode rather than serial mode.

This test only tests the original pins present on the Rev A and B. It
does not test the extra pins on the Revision A2, B2 nor the A+ or B+

Please make sure everything is removed and press the ENTER key to continue,
or Control-C to abort...

          The main 8 GPIO pins  0: 7:  OK
                The 5 SPI pins 10:14:  OK
               The serial pins 15:16:  OK
                  The I2C pins  8: 9:  OK

Hopefully all of the end lines say OK, otherwise the GPIO is not working correctly on the Pi Zero itself.

After the test restart the Pi to reset the GPIO pins back to their standard behavior.

ojd233's picture

I performed the test and the results were all OK. Although this must mean that either the it is not my pi.

piborg's picture

That is good news, but it still does not explain the trouble.

Just for testing can you see if everything still works fine with the B+?

ojd233's picture

Yes I can confirm that the script does work on the b+

ojd233's picture

Currently the camera has decided to stop working. I am going through the setup again, and installing updates and upgrades to see if it works

Subscribe to Comments for "DiddyBorgRed with Pi Zero"