Hi,
I am trying to find a way to send movement commands to a CC3D (on a quad-copter) from an Arduino.
If it would be easier to use a raspberry pi, any tips related to that would be equally welcome, but it seems from my research as though an Arduino would be the more achievable option.
The commands I need to send are: Pitch, Yaw, Throttle and Roll.
Flight-mode and gimball move commands would also be nice but are not essential.
Here's what I've tried already and the results.
First I tried to send the CC3D a PWM input from a RPi, using the RPi GPIO python module.
I was rather unsure about the difference between Duty Cycle and Frequency, but I tried every combination of the following ranges for both:
0 - 100, 0 - 255 and 1000 to 2000.
The CC3D did not register any input in any of these scenarios.
I then tried to send PWM signals to the CC3D from an Arduino nano using the analogWrite() function.
With this method the CC3D acknowledged that a PWM signal was being received on the specific channel, but in could not seem to interpret that input as a meaningful value.
Then I stumbled upon this page:
https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/93945858/Extend+a+Flightcontroller+with+an+ArduinoI tried to follow it's instructions on a device running Debian, but ran into an issue setting up the build environment.
After some tracing, I determined the source of the error to be:
"Error: dependency is not satisfiable: qtdeclarative-abi-5-7-0"
I tried to manually install this dependency with no success.
Note: This was my first attempt to install librepilot on this Debian device.
To get the readings of PWM input from the CC3D that I mentioned above, I used librepilot running off a windows Vista device.
I then tried to install librepilot normally on the Debian device and got the same error.
I have not attempted to set up a build environment on the Windows Vista device, but if you think that that is worth a shot then I am happy to give it a go.
I believe that I only need the build environment to get the header files generated by UAVObjectGenerator. Is there somewhere that I can download these from without generating them myself?
I found a copy of LibrePilotSerial.h at
https://github.com/MarcProe/LibrePilot.arduino .
These are just the things that I have tried, if you have some totally different idea that will help me to control a CC3D from an Arduino or Raspberry pi, then please let me know.
Thanks,
Mb