How to command attitude?

Post Reply
Krisha93
Posts: 4
Joined: Mon Aug 16, 2021 5:34 am

How to command attitude?

Post 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!

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: How to command attitude?

Post 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.

Krisha93
Posts: 4
Joined: Mon Aug 16, 2021 5:34 am

Re: How to command attitude?

Post 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!

Krisha93
Posts: 4
Joined: Mon Aug 16, 2021 5:34 am

Re: How to command attitude?

Post 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!

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: How to command attitude?

Post 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

Krisha93
Posts: 4
Joined: Mon Aug 16, 2021 5:34 am

Re: How to command attitude?

Post by Krisha93 »

Thank you very much Patrik! I will check the code you sent.

Post Reply