I2c not working

Hi
I have a 2pcs GrovePI+ and I have the same result.
I tried to connect official oled screen and official I2C motor driver and it doesn’t work. I used basic example for each board.
Nothing display on the oled screen.
On the motor driver, nothing happened and red and green LED on each side stay on.

I2c 0x04 is detected but nothing connected…

My log file :
log.txt (3.1 KB)

I already tried to re install but it is exactly the same.
thanks in advance for your help
Julien

2 Likes

Maybe I’m wrong here, but the 0x04 looks like drivers for the Grove Pi may not be installed.  I’m no expert but at least for the Adafruit RTC clock modules at 0x68, this turns to “UU” once the correct kernel module is loaded by config.txt.

Since you’re running a Pi-3, have you tried Stretch?

1 Like

Could you give links for each device and a link to the software you tried?

I looked at the log file and everything looks normal, so need to see the software examples and specifics on the two I2C devices you are trying to access. There are some old examples that expect connections on /dev/i2c/0 and not bus 1.

[Update: Oh, are you using dexterOS? You may want to give GoPiGo OS a try as it is the most current “official” OS. (Just do not run update on the OS. It will break it.)]

1 Like

Blockquote

No already.

(I need to split my answer because new user can add only 2 links.)

2 Likes

Please find attached files.
grove_i2c_motor_driver.py (2.4 KB)
motor_example.py (2.9 KB)

2 Likes

grove_128_64_oled.py (9.4 KB)

2 Likes

I bought on Digikey:
https://www.digikey.fr/product-detail/fr/103010002/1597-1013-ND/5482491
https://www.digikey.fr/product-detail/fr/104020208/1597-104020208-ND/10667534
Motor driver is “I2C Motor driver v1.3b” bought last year.

I made the installation last year and I ran the update… hoping this with solve the issue…
Do I need to come back to the 2019.04.05_Raspbian_For_Robots_by_Dexter_Industries_Stretch.zip ?

Thank you very much for you help!

2 Likes

Looking in your log.txt file, it shows the OLED display card is seen at the 0x3c I2C bus address listed in the driver file you listed.

But that is the driver file, did you run the “grove_128_64_oled_test.py” which should print “Hello World” on the display?

1 Like

The log.txt file shows the motor driver card is seen at the expected 0x0f I2C address.

The motor driver has a main() that repeatedly drives both motors forward and reverse, so I would have guessed that you would see the red and green direction LEDs oscillate on/off when executed.

What kind of motor is attached (DC or stepper)?
If DC motors, do you have external power connected to the board? (not that that should affect the fwd/rev indicators to my knowledge…)

1 Like

Your log file lists that you are running the 17 October 2020 Raspian For Robots which is the same version I am running for my GoPiGo3 robot “Carl”. I do not think you need to try the older Stretch version.

1 Like

Yes, but no error and nothing diplayed.

No motor are connected. When I run the script, there is no error and all led stay ON.

So what can I do :frowning: ?

How can I check that ?

2 Likes

Are you allowing enough time for the motors to actually move?

If you have code that is like this

move forward
move backward
move forward
move backward
[. . . . .]
move forward
move backward

it will run so quickly that the motors don’t have time to move.

Instead, try something like this:

move forward
sleep(0.5)
move backward
sleep(0.50
[. . . .]
move forward
sleep(0.5)
1 Like

I checked the scripts you posted - not a problem in this case.

At this point, you seem to have everything connected properly, and running the correct software, on a good OS - all good.

The last thing I can think of to check is if there is adequate power to run everything.

First run this command:

vcgencmd measure_temp && vcgencmd measure_clock arm && vcgencmd get_throttled

On my system:

pi@Carl: ~/Carl $ vcgencmd measure_temp && vcgencmd measure_clock arm && vcgencmd get_throttled
temp=52.6'C
frequency(48)=600000000
throttled=0x0

Then shutdown and disconnect the motor driver board, leaving only the display board connected - no sensors or LEDs, just the RPi, GrovePi+, and the display board.

Boot up again,

  • run the throttled command again to check for any power issue,
  • try the display test again

If the throttled=0x0 and the display does not work, I am totally out of ideas.

1 Like

The examples have 2 second delays between the commands.

1 Like

What do you mean by “official”?  An “official” Seeed studio’s product?

It has been my experience with Seeed products that, though they sell the products themselves, they leave support and engineering to others.  Likewise, it is not uncommon for their “sample” software to fail to work.

You may want to check the demo software against the actual specification in the datasheet on Seeed Studio’s site:

The datasheet is in English, and it goes into a lot of detail, describing how to get the display to work.

Have you gotten anything else to work while connected to the Grove board?

Before reboot:
temp=46.2’C
frequency(45)=600064000
throttled=0x0

After reboot:
temp=46.7’C
frequency(45)=600062000
throttled=0x0

I am using the 2.5A raspberry power adapter.

Is there any trouble because of VNC ? I use VNC to operate on the PI.

2 Likes

The ultrasonic distance sensor connected on digital input (D4) is working.

1 Like


Wiring is correct ?

2 Likes

Julien, it appears correct and since the board is showing up at address 0x3c as the driver expects, and the test program oled.init() is sending commands without exception, it appears to be powered and functioning.

I don’t know why it is not displaying anything when you run the test program. Did you try pointing a flashlight or strong light on the display? I don’t know if that would show anything, but it might let you know more.

At this point, I feel you are going to have to contact either the folks you purchased it from, or the folks that made the board.

I am just totally out of ideas. Sorry.

1 Like

I have no issue with my PI. I have several new on the way and also several motor board.
I will check if it is coming from the PI or from the other board.

1 Like