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

Input to control the MultiWii

Postby Piero78 » Fri Jul 22, 2016 2:51 pm

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

Postby gregd72002 » Fri Jul 22, 2016 4:43 pm

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

Re: Input to control the MultiWii

Postby Piero78 » Fri Jul 22, 2016 5:25 pm

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.
Piero78
 
Posts: 4
Joined: Fri Jul 22, 2016 2:46 pm

Re: Input to control the MultiWii

Postby gregd72002 » Fri Jul 22, 2016 5:37 pm

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

Postby gregd72002 » Fri Jul 22, 2016 5:41 pm

you should be sending it in a loop otherwise MW will go into failsafe. (i think it is after 1sec of not receiving it)
gregd72002
 
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm

Re: Input to control the MultiWii

Postby Piero78 » Fri Jul 22, 2016 5:46 pm

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?
Piero78
 
Posts: 4
Joined: Fri Jul 22, 2016 2:46 pm

Re: Input to control the MultiWii

Postby gregd72002 » Sat Jul 23, 2016 6:13 pm

These are absolute values, independent of each other.
2000 (max) or 1000 (min)
gregd72002
 
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm

Re: Input to control the MultiWii

Postby Piero78 » Sun Jul 24, 2016 2:36 pm

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.
Piero78
 
Posts: 4
Joined: Fri Jul 22, 2016 2:46 pm

Re: Input to control the MultiWii

Postby gregd72002 » Mon Jul 25, 2016 10:45 am

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.
gregd72002
 
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm


Return to Software development

Who is online

Users browsing this forum: No registered users and 14 guests

cron