Open JTPernu opened 1 year ago
Have you found a soluton to this? I am also having the same issue.
yaaa me too
Have you found a soluton to this? I am also having the same issue.
have you found it works some but doesn't work some times .
I have found a solution. the code is a few years out of date, so one of the things you need to do is replace all the Pin() lines with machine.Pin(). this fixed the error for me, however you do need to make sure that your i2c device is connected to the pins you set in the code.
having said that, i am now getting an error saying that the Servos commands arent there.
replace all Pin() lines with machine.Pin()
This shouldn't actually make a difference. At least the current file imports machine.Pin() in a way, that just saying Pin() includes the library already: from machine import I2C, Pin
Have you found a soluton to this? I am also having the same issue.
I have, I guess. It's a fiddly thing, it looks like, but the problem can be solved by rebooting the pico, I think. Or reconnect to it. I haven't a clue how, but I did get it to work with that. But do make sure to fix the import statement from Servo.py.
your
Have you found a soluton to this? I am also having the same issue.
I have, I guess. It's a fiddly thing, it looks like, but the problem can be solved by rebooting the pico, I think. Or reconnect to it. I haven't a clue how, but I did get it to work with that. But do make sure to fix the import statement from Servo.py.
can i get your discord
i have gotten everything working now, i just needed to restart the pico, however its not moving the motors.
your
Have you found a soluton to this? I am also having the same issue.
I have, I guess. It's a fiddly thing, it looks like, but the problem can be solved by rebooting the pico, I think. Or reconnect to it. I haven't a clue how, but I did get it to work with that. But do make sure to fix the import statement from Servo.py.
can i get your discord
is this to me or them?
your
Have you found a soluton to this? I am also having the same issue.
I have, I guess. It's a fiddly thing, it looks like, but the problem can be solved by rebooting the pico, I think. Or reconnect to it. I haven't a clue how, but I did get it to work with that. But do make sure to fix the import statement from Servo.py.
can i get your discord
If you mean me, mind if I ask why?
i have gotten everything working now, i just needed to restart the pico, however its not moving the motors.
Does it give you any error message? Or is it just not moving? If the former, please show us the message, if the latter, please show the code. I can try and help you solve it, if you need help
this is all the code in the main.py:
from machine import I2C, Pin from servo import Servos sda = machine.Pin(4) scl = machine.Pin(5)
i2c = I2C(0, sda=sda, scl=scl)
servo = Servos(i2c=i2c) servo.position(index=0, degrees=180)
idk why it formatted like that tho
this is all the code in the main.py: #from pca9685 import PCA9685
from picocat import Servos
from machine import I2C, Pin from servo import Servos sda = machine.Pin(4) scl = machine.Pin(5)
i2c = I2C(0, sda=sda, scl=scl)
pca = PCA9685(i2c=i2c)
pca.i2c = i2c
servo = Servos(i2c=i2c) servo.position(index=0, degrees=180)
Hmmmm... Looks like you're putting the pca.py into comments, so that might be it. And
pca=PCA9685(i2c=i2c)
is commented too.
Bet beyond that, you can always scan four i2c, if the code finds the device at all: devices = i2c.scan( if len(devices) != 0: print('Number of I2C devices found=',len(devices)) for device in devices: print("Device Hexadecimel Address= ",hex(device)) print() else: print("No I2C device found")
If you want, here's my test code. You can try with that. I use different pins and file name, so do change those in the code before trying.
i have gotten everything working now, i just needed to restart the pico, ho
because its hard to talk here it will better if we discuss there
any permanent way to fix the error @JTPernu @thethoughtfulinventor
Gokul#9638 - Discord
maybe, i wont know untill friday or monday tho. i let out the magic smoke by accident
any permanent way to fix the error @JTPernu @thethoughtfulinventor Gokul#9638 - Discord
welp, i just installed the program on the new pico, and it works just fine. my guess is that you guys need to reintall micropython on your bords.
There's an issue with writing to memory, it seems. Gives this error comand, even with the demo:
Traceback (most recent call last): File "", line 11, in
File "/lib/pca9685_for_pico/pca9685.py", line 29, in init
File "/lib/pca9685_for_pico/pca9685.py", line 39, in reset
File "/lib/pca9685_for_pico/pca9685.py", line 32, in _write
OSError: [Errno 5] EIO