Dear All,
Please may someone very kindly assist me?
I have built my own drone with an android phone connected to an IOIO board (https://www.sparkfun.com/products/13613) which outputs PWM signals to my ESCs.
For Controls, I have an Xbox remote BlueToothed to the flying phone.
In my android app, I am able to read the stick movements on the remote but now need to convert them to Throttle values to send to the ESCs, so far I have the below:
Given values: Throttle, DeltaX and DeltaY
BL = (((Throttle + (DeltaX - DeltaY))10)+1000)
FL = (((Throttle + (DeltaX + DeltaY))10)+1000)
BR = (((Throttle - (DeltaX + DeltaY))10)+1000)
FR = (((Throttle - (DeltaX - DeltaY))10)+1000)
I am looking for the correct formulas to translate stick movement into a corresponding change in throttle to steer the drone. I am not sure if the above formulas are correct because if the drone is at 100% throttle then some output values would be "clipped" out.
Any advice would be greatly appreciated.
sadly I didn't follow up on the phone-drone initiative. I know there was a kickstarter project trying to get some funds but haven't seen anything on the market to confirm they got it to work consistently.
From what I recall though, the idea to use a smartphone as flight controller is only limited to how hast it can read data from sensors (gyro, baro, gps, compass, lidar etc.) and produce output commands for the motors.
Now whether this is done via PWM or SBUS I have no clue, the easiest was to go with PWM since the hardware was somewhat simpler to come by and the connectivity wasn't that much of an issue with the smartphone, if I'm not mistaken it took some sort of OTG-to-UART converter then there was another chip downstream which actually took the outputs from the smartphone and did the conversion to PWM and sent it to the motors.
While running the app i'm getting this error:-
Unable to find method 'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
Pleasae help me
Dends on which language you wish to use. There are parsers for MAVLink protocol for Java, Python, C.
A good place to start is here:
https://mavlink.io/en/getting_started/use_libraries.html
I managed after some problems along the way to have a Java based MAVLink parser package which worked decently well with the APM 2.5 and 2.8, both speak MAVLink v 1.0 or 1.1 (I forget which, it was a long time ago)