Using GPIO/I2C as pwm from voxl for payload
Hi guys, I wanted to avoid dealing with the px4 side of things to control a payload actuation, that requires a PWM modulation using LTE. Apparently mavsdk does not support control of a payload.
I wanted to know if this is possible in the voxl:
or this one
Using the pca9685
Hi @Aldo-Castro-Freire ,
VOXL has an I2C port (3.3VDC logic levels) that you can use so in theory yes:
Let me know if you need more details, here's the port:
Thank you I can use that. One more question is it possible to implemented with the pca9865 that requieres a format like this one:
If so, what method can I use to program it?
base on my research:
Based on that we need to install
sudo pip3 install adafruit-circuitpython-pca9685
sudo pip3 install adafruit-circuitpython-servokit
would that be possible to do, or do have to run it on docker if so I am not sure on how to connect to external i2c ports
This isn't something we have tried. Python3 isn't on VOXL by default but you can follow the instructions here to get it going
How do I build the ipk image mentioned in the first step ?
@Aldo-Castro-Freire If you haven't yet, you will want to follow the steps here to get voxl-docker installed on your desktop in order to use voxl-emulator which allows you to build IPKs for VOXL on your desktop machine.
- First you will run
voxl-docker -i voxl-emulator
- Then in the docker container you will run
- Next, also in the container you will run
- After, this you can exit the docker container and push the ipk to your VOXL with
adb push Python_3.6.9_8x96.ipk /home/root/ipk
- Lastly, you can install the ipk with
opkg install /home/root/ipk/Python_3.6.9_8x96.ipk
- First you will run
To be clear though, @Aldo-Castro-Freire you will still need to use voxl-io to communicate with the peripheral
@Chad-Sweet I am confused now, I thought the point of the library is that so I will not have to deal with the low-level logic. vox-i2c Basically I still wanna be using the pca9865 to convert to PWM that I can use to control
right now I am not sure. how to connect those two together.
Yes, sorry for the confusion, voxl-i2c is a part of voxl-io. You will want to use voxl-i2c to communicate with an i2c peripheral
My question is there a driver for pca9865 that I can use? Cause right now it seems I have not way of accessing the i2c port even if I use the libraries from adafruit.
So my question is can I run a python program that uses the i2c port to control the pca9865 that will allow me to control servos or payload actuation as an IoT device basically.
No, that is not currently available. What you described would require coding in python to make the appropriate voxl-i2c calls per the pca9865 specification
Is there any other module that I can use to control something using the voxl. As I see I am not sure if voxl support any other devices.
Do you have any recommendations?
Looking for a way to trigger servos without having to install another computer.