problems PicoBorg Reverse

hi,

i'm new here, so sorry if my English or my explications isn't perfect :)

i have some problems when i want to run diddysequence

i have this error message :

"No PicoBorg Reverse found, check you are attached :) "

i have already look after other subjets but donc find issues

thanks for the help

piborg's picture

The most likely explanation is that the two 3-pin cables between the Raspberry Pi and PicoBorg Reverse are not making a good connection.

First I would double-check that these cables are connected the correct way around and that they are pushed firmly onto the connectors at both ends.

If you can then run these two commands and let us know what results are shown on the screen:

  1. sudo i2cdetect -y 0
  2. sudo i2cdetect -y 1

that's what i have on my screen :)
thanks a lot for the help

pi@raspberrypi:~ $ sudo i2cdetect -y 0
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory
pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- 44 -- UU -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- 5f
60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- --
70: -- -- -- -- -- -- --

piborg's picture

The 44 shown is the default address for PicoBorg Reverse, so it should be working.

Could you run these commands to start Python:

cd ~/picoborgrev
python

And then use these commands to setup the PicoBorg Reverse:

import PicoBorgRev
PBR = PicoBorgRev.PicoBorgRev()
PBR.Init()

If you could copy the full output from Python it might help us figure out what is wrong.

hi,
that's the output python result , thanks a lot

Attachments: 
piborg's picture

It looks like you might be running an old version of the PicoBorg Reverse library. We recently found a problem with the I2C code which causes this ID 00 instead of 15 error.

We have since fixed this problem, all you need to do is download the updated version of PicoBorgRev.py and it should start working. Follow this guide to update your code: PicoBorg Reverse library fix.

i have already change all the PicoBorgRev.py file with the correct libraries ... i don't understand why the problem is always here...

is it maybe a problem with the version of raspbian ?

piborg's picture

The version of the script it is loading is definitely the old one, the new version does not automatically try the old "bus 0", the screenshot you posted did.

If you run these commands you can check:

cd picoborgrev
head PicoBorgRev.py -n 34

The new version output looks like this:

pi@PiBorg:~ $ cd picoborgrev
pi@PiBorg:~/picoborgrev $ head PicoBorgRev.py -n 34
#!/usr/bin/env python
# coding: latin-1
"""
This module is designed to communicate with the PicoBorg Reverse

Use by creating an instance of the class, call the Init function, then command as desired, e.g.
import PicoBorgRev
PBR = PicoBorgRev.PicoBorgRev()
PBR.Init()
# User code here, use PBR to control the board

Multiple boards can be used when configured with different I²C addresses by creating multiple instances, e.g.
import PicoBorgRev
PBR1 = PicoBorgRev.PicoBorgRev()
PBR2 = PicoBorgRev.PicoBorgRev()
PBR1.i2cAddress = 0x44
PBR2.i2cAddress = 0x45
PBR1.Init()
PBR2.Init()
# User code here, use PBR1 and PBR2 to control each board separately

For explanations of the functions available call the Help function, e.g.
import PicoBorgRev
PBR = PicoBorgRev.PicoBorgRev()
PBR.Help()
See the website at www.piborg.org/picoborgreverse for more details
"""

# Import the libraries we need
import io
import fcntl
import types
import time

pi@PiBorg:~/picoborgrev $

The new version imports io and fcntl. The old version uses smbus instead.

I would suggest re-installing the software completely:

cd ~
rm -r picoborgrev
bash <(curl https://www.piborg.org/install-picoborgrev.txt)

i show you the result..
don't understand ..

Images: 
piborg's picture

Okay, it looks like the ~/diddyborg directory does have the correct version.

Based on the sudo i2cdetect -y 1 results I am assuming you have other devices connected to the GPIO on your Raspberry Pi. Can you try the following:

  1. Turn the Raspberry Pi off
  2. Disconnect everything from the GPIO except the PicoBorg Reverse
  3. Power the Raspberry Pi back on and try your script again

Hi ,
i have done what you told me 2 days before,
and that's my results..
i don't understand

Images: 
piborg's picture

This looks very strange, the code seems to be working fine from the ~/picoborgrev directory, but not the ~/diddyborg directory.

Try running these commands to copy the files from the ~/picoborgrev directory:

cd ~/diddyborg
rm *.pyc
rm PicoBorgRev.py
cp ~/picoborgrev/PicoBorgRev.py ./

Be extra careful typing the commands in, Linux is very picky about upper / lower case letters and exact symbols (~, ., * for example). It may be easier to copy and paste each command into Putty to be safe.

After that try the script again and see if it now works.

Subscribe to Comments for &quot;problems PicoBorg Reverse&quot;