It's Holiday Sale Weekend at Adafruit - use the code ADATY to get 15% off items storewide! Some restrictions apply.
0

No i2c device at address but code shows the I2C address exis
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

No i2c device at address but code shows the I2C address exis

by sagarpatel1030 on Thu Oct 21, 2021 10:54 pm

hello, I'm just trying to run the stepper motor test on an RP2040 and a stepper motor driver all in circuitpython

when I run an I2C scan I get addresses at 0x60 and 0x70 https://imgur.com/a/OjhQxhm


https://imgur.com/a/l3TvNGE (what I get if I disconnect the motor driver and run the i2c search again)

Then without touching anything I load the simple test code and I get "ValueError: No i2c device at address: 60 " https://imgur.com/a/OtlHhvv\

I have no idea how to fix this, I tried addressing it to 0x60 in an example I saw in another adafruit post but that also gets me nowhere. I have no idea what to do and I've been messing with just trying to get the test code to work for a few hours now.

Any help would be greatly appreciated, sorry this is my first time using python so if its something unbelievably obvious I honestly wouldn't be able to tell

sagarpatel1030
 
Posts: 3
Joined: Thu Oct 21, 2021 10:43 pm

Re: No i2c device at address but code shows the I2C address

by franklin97355 on Thu Oct 21, 2021 11:04 pm

Where did you find that program? The programs I found all say
Code: Select all | TOGGLE FULL SIZE
from adafruit_motorkit import motorkit

kit = MotorKit()

franklin97355
 
Posts: 22320
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: No i2c device at address but code shows the I2C address

by sagarpatel1030 on Thu Oct 21, 2021 11:38 pm

franklin97355 wrote:Where did you find that program? The programs I found all say
Code: Select all | TOGGLE FULL SIZE
from adafruit_motorkit import motorkit

kit = MotorKit()






I found it here at the bottom of the circuitpython usage page as the full example since all I was trying to do was get it to run to make sure it works

https://learn.adafruit.com/adafruit-ste ... cuitpython


If I get rid of the " i2c=board.I2C() " it still says the same thing about no address at 60

sagarpatel1030
 
Posts: 3
Joined: Thu Oct 21, 2021 10:43 pm

Re: No i2c device at address but code shows the I2C address

by sagarpatel1030 on Sun Oct 24, 2021 6:18 pm

franklin97355 wrote:Where did you find that program? The programs I found all say
Code: Select all | TOGGLE FULL SIZE
from adafruit_motorkit import motorkit

kit = MotorKit()



Finally figured it out, turns out even though the green led was running very bright there wasn't enough power going to it so it wasn't initializing

I was using a battery bank that could output up to 5v at 3Amps but I missed over the fact that it needs a smart signal to max out the power output, so it was probably giving it just enough power to turn the light on and that's it

Plugged it into a continuous 5v 1a power source and problem solved

sagarpatel1030
 
Posts: 3
Joined: Thu Oct 21, 2021 10:43 pm

Please be positive and constructive with your questions and comments.