Closed crazyquark closed 4 years ago
what if you remove the motors from the shield and run the script?
Can you verify that you're installing the libgpiod2 package as well? python3-libgpiod is only the python3 bindings, but you need the library as well if you're installing it via packages.
For SPI, we couldn't get it working either, which is why it says no SPI support on https://learn.adafruit.com/circuitpython-libaries-linux-odroid-c2/faq-troubleshooting-2.
@ladyada yes, if the motors are not connected it does not freeze, please note that I am now powering the motors separately but who knows... @makermelissa yes, the libgpiod2 is installed as dependency of python3-libpiod Actually, I was able to get SPI working by switching to nigthly builds and editing the DTB... quite hackish, see this: https://forum.armbian.com/topic/13389-crazyquark/?tab=comments#comment-97282
if removing the motors stops the problem... its almost certainly motor noise :) it can feed thru the ground. add caps and keep the motors FAR AWAY :) https://www.pololu.com/docs/0J15/9 https://medium.com/jungletronics/dc-motors-against-back-emf-589d8ed174cc
OK, on the nightly kernel, I can;t get it to freeze but I now get this exception at times:
kit.motor2.throttle = 0
Traceback (most recent call last):
File "
whats the actual error , its been cut off
Ah, sorry, it's: OSError: [Errno 6] No such device or address
please hard reboot, something went bad in the i2c. as we think this is all wiring issues, not code at all, it would be better if you posted in the tech support forums than here because it is not a code issue and our engineers can assist :) please re-open if you can show it is a software bug :)
FYI, I just tested, same HAT, same code, on a RPi 3 it works flawlessly, so I am not convinced it is a wiring or hardware issue, I am pretty sure it's a software one. It could be that the i2c driver in Armbian is just unreliable. The odd thing is that only crashes when the motors are connected and/or powered.
Hello!
I've used the previous version of this with an Odroid-C1+ but decided to upgrade to the latest version, following this tutorial: tutorial Sadly, there a few issues, hope you can guide me in the right direction:
My armbian logs: logs