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.
Input to control the MultiWii
-
- Posts: 103
- Joined: Fri Dec 12, 2014 5:16 pm
Re: Input to control the MultiWii
here is good overview:
http://www.multiwii.com/wiki/index.php? ... l_Protocol
And here the details: https://github.com/multiwii/multiwii-fi ... otocol.cpp
http://www.multiwii.com/wiki/index.php? ... l_Protocol
And here the details: https://github.com/multiwii/multiwii-fi ... otocol.cpp
Re: Input to control the MultiWii
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.
-
- Posts: 103
- Joined: Fri Dec 12, 2014 5:16 pm
Re: Input to control the MultiWii
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]
[$,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]
-
- Posts: 103
- Joined: Fri Dec 12, 2014 5:16 pm
Re: Input to control the MultiWii
you should be sending it in a loop otherwise MW will go into failsafe. (i think it is after 1sec of not receiving it)
Re: Input to control the MultiWii
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?
[$,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?
-
- Posts: 103
- Joined: Fri Dec 12, 2014 5:16 pm
Re: Input to control the MultiWii
These are absolute values, independent of each other.
2000 (max) or 1000 (min)
2000 (max) or 1000 (min)
Re: Input to control the MultiWii
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.
[$,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.
-
- Posts: 103
- Joined: Fri Dec 12, 2014 5:16 pm
Re: Input to control the MultiWii
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.
The drone will hover if yaw, pitch, roll is in the middle and throttle is enough to keep it up in the air.