Input to control the MultiWii

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Piero78
Posts: 4
Joined: Fri Jul 22, 2016 2:46 pm

Input to control the MultiWii

Post by Piero78 »

Hello, I want to develop an application in Visual C# to control a quadrotor with MultiWii controller via bluetooth. I need to know what are, in the sketch MultiWii.ino, the commands that I have to send to the board for the actions.
Can someone help me? Thanks.


Piero78
Posts: 4
Joined: Fri Jul 22, 2016 2:46 pm

Re: Input to control the MultiWii

Post by Piero78 »

In my Arduino robot I control them (via bluetooth) writing on the serial port with the SerialPort() class. I've seen the MSP but I don't understand what are the commands I've to send to the board. Can you write an example to roll (forward and back) the drone? Thanks.

gregd72002
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm

Re: Input to control the MultiWii

Post by gregd72002 »

Only a single command is required (given your robot is armed): MSP_SET_RAW_RC

[$,M,<,16,200,1500,1500,1500,1500,1500,1500,1500,1500,CRC]

All values are single char but the 1500 ones.
The 1500 are uint16 values roll,pitch,yaw,throttle,aux1,aux2,aux3,aux respecively

Given you robot is armed you should send the throttle at around 1000 and pitch at 2000 (max) or 1000 (min), so:
[$,M,<,16,200,2000,1500,1500,1000,1500,1500,1500,1500,CRC]

gregd72002
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm

Re: Input to control the MultiWii

Post by gregd72002 »

you should be sending it in a loop otherwise MW will go into failsafe. (i think it is after 1sec of not receiving it)

Piero78
Posts: 4
Joined: Fri Jul 22, 2016 2:46 pm

Re: Input to control the MultiWii

Post by Piero78 »

Thanks, a question about this command:

[$,M,<,16,200,2000,1500,1500,1000,1500,1500,1500,1500,CRC]

In this case the drone go forward because the value of ROLL is greater than others?

gregd72002
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm

Re: Input to control the MultiWii

Post by gregd72002 »

These are absolute values, independent of each other.
2000 (max) or 1000 (min)

Piero78
Posts: 4
Joined: Fri Jul 22, 2016 2:46 pm

Re: Input to control the MultiWii

Post by Piero78 »

Ok, but, for example, with this command:

[$,M,<,16,200,1500,1500,1500,1500,1500,1500,1500,1500,CRC]

the drone is in overing?
I want to understand how I can drive the drone, for example forward.

gregd72002
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm

Re: Input to control the MultiWii

Post by gregd72002 »

These are PWM inputs, varying from 1000-2000Hz. Each one describes a separate channel as stated in http://www.multiwii.com/wiki/index.php? ... l_Protocol

The drone will hover if yaw, pitch, roll is in the middle and throttle is enough to keep it up in the air.

Post Reply