ArduCAM / PCA9685

This library is used for Arducam Pan Tilt Camera for Raspberry Pi
18 stars 13 forks source link

Python example code #2

Open FunkyGandalf opened 3 years ago

FunkyGandalf commented 3 years ago

I purchased the upgraded Pan-Tilt platform kit for Raspberry Pi Camera (B0283) but the only example is for Jetson and the demo is an executable only. Could we get some Python examples usable on the Raspberry Pi to demonstrate how to control the pan-tilt servos?

Thanks!

acorpuz101 commented 3 years ago

The Jetson example works for the PI. Make sure the l2c interface is enabled and then run "python3 ServoKitExample.py".

hystrix1 commented 3 years ago

Even with I2C enabled, the Jetson example does not work on the Pi. I get: ValueError: No I2C device at address: 0x40

elenfoxx commented 3 years ago

I have the same problem. Has anyone figured it out? I2C is enabled

fire-eggs commented 3 years ago

"No I2C device at address 0x40" means the device is not there.

If you've done:

sudo apt-get install python-smbus
sudo apt-get install i2c-tools

And executed the following to scan for I2C devices:

sudo i2cdetect -y 1

the output should show '0x40'. If it does not, the device is not working.

fire-eggs commented 3 years ago

Digging through articles in forum.arducam.com , if the device is wired correctly and not detected via I2C, the final solution is usually "the baseboard is defective. Contact sales@arducam.com for replacement".

surak commented 2 years ago

This is not a bug on the software - it's either documentation (in the sense that this code DOES run on the Raspberry), and of hardware (your board is faulty).

Therefore, I would close this bug and make a new PR, to fix the naming of the python example and its documentation, to show that it handles the Raspberry Pi just fine.

I just made a PR for the README.md addressing this on the README, but you are always welcome to do the aforementioned fix.