i have an CubeOrange and want to drive an ESC Motor.
I flashed the Examples for RCOutput and AP_Motors but i dont get the motor to run.
After flashing AP_Motors example i can connect with CubeOrange as follows:
thanks for your reply. Yeah at first i tested the drone if all is working and ready to arm.
But i only want to drive a single esc motor from ardupilot firmware. Cause of this i read at developer side that i could use RCOutput class to send pwm singals, so i tried these examples but could not get a signal out.
What is your use case? Do you need any of the other Ardupilot functionality?
I’m not familiar with the AP_Motors example but maybe @iampete could provide more info on how to use it.
Go and have a look at the libraries/AP_HAL/examples/RCOutput/RCOutput.cpp example sketch. You’ll see that it just sets up all the channels to wave the servos from minimum to maximum over a few second period. Hook up some servos to your board and then test to make sure it works for you.
And this is not working for me. I measured all of my 14 output channels with an oszilloscope, but didnt get any value.
I suspect you are not getting many replies because we’re not sure what you are trying to achieve and why it seems you are using a non-standard method.
If you just want to test an ESC and motor, and potentially go onto using it in some permanent arrangement, you only need standard firmware installed, USB to MissionPlanner and go into the motor test section.
You would need to configure the frame details too, or nothing related to motors will work. So set it as a QuadX for simplicity and familiarity.
I want to customize the ardupilot firmware. Therefore i need to drive a seperate esc motor for my purpose.
So my workflow is something like this: Read sensor → run custom logic → drive esc motor based on this logic. The esc motor i want to drive has nothing to do with the four motors used for flying.
So first i wanted to test if i could drive a separate motor without firmware to include this knowledge to build custom firmware.
You may even be able to run the standard firmware and use a PWM output to run the other motor via some input conditions such as LUA scripting, companion computer, Mavlink (telemetry commands) or just plain RC channel passthrough.
There’s almost never a need to modify the firmware - if you can think of 10 crazy things to do with a flight controller, chances are someone has done 12 of them
In this case lots of people hang all sorts of things off their flight controllers.
It really depends what this additional motor is for and what conditions you expect to drive it.
Someone here may be able to help with suggested LUA script samples if we know more details.
But LUA scripting capability has been expanding constantly:
i have successfully run the RCOutput example. I can now drive a servo motor with it.
The only thing i had to do was adding the following method call in the setup function: