Page 1 of 1

How to command attitude?

Posted: Mon Aug 16, 2021 5:45 am
by Krisha93
Hello!
I am a beginner. I just started working with MultiWii. I wanted to implement my code for a project. My code generates attitude setpoints. I wanted to command these to the controller. How should I do this? Any guidance will be appreciated.
Thank you!

Re: How to command attitude?

Posted: Mon Aug 16, 2021 12:23 pm
by PatrikE
You can control MWii either by radio output.
Emulating PPM or any of the RC protocols supported.
You can also use the serial and control with the MSP protocol.

Re: How to command attitude?

Posted: Mon Aug 16, 2021 1:50 pm
by Krisha93
Thank you PatrikE! I wanted to do it without using RC. Can I modify the MultiWii code ? Please can you provide more information about MSP ?
Thank you very much for your time!

Re: How to command attitude?

Posted: Wed Aug 18, 2021 9:53 am
by Krisha93
I did a quick research on MSP. From what I understood, for MSP, I will need an additional onboard computer like Rpi. I do not plan to use radio. Thus, I will stick with emulating RC protocol in my code. It will be great if anyone would provide a starting point for emulating PWM/PPM.
Thank you!

Re: How to command attitude?

Posted: Thu Aug 19, 2021 5:12 pm
by PatrikE
Hi,
I played around a bit with reading a NintendoWii Nunchuk in the days when it was the thing we developed the code around.
The code reads the nunchuk and map it to a Array CH_uS[#].
Then void ppmoutput() {} Sends the PPM signal on a selected pin.

It worked then on a ProMini.
https://drive.google.com/file/d/1kb4eDS ... sp=sharing

Hopefully You can find something useful in the code example.
Good luck
Patrik

Re: How to command attitude?

Posted: Fri Aug 20, 2021 9:30 am
by Krisha93
Thank you very much Patrik! I will check the code you sent.