Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Controlling The Multiwii Flight Controller Through I2c

As I mentioned on another thread, I have been on the hunt for a quadcopter flight controller. I narrowed it down to the MultiWii PRO Ez 3.0. witespyquad.gostorego.com/flight-controllers/multiwii-pro-ez3-0-flight-controller-w-gps-option.html

Here's my problem. It uses i2c. I don't know how to use i2c, and I don't know the different commands for the multiwii.

I found this page with serial protocol, but I don't know if this is what I need or not.

Any help is appreciated. No I do not have the board yet but I am trying to see if this board will work.

All I want to do is get basic commands like forward, backward, left, right, up and down.


Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

United Kingdom
You need to find out the correct syntax of the data that is sent to the board first. However, there are no examples of the syntax on the pages you linked to.

The I2CWrite command basically sends whatever you tell it to send to the desired address. So, if the board is addressed as 0x30 you need to provide that information.

So the command is I2CWrite(Board Number, Address, Data)

for instance


I2CWrite(0,0x30,"MSP_MISC MAXTHROTTLE 2000")

Note: The syntax of the data may not be correct, as mentioned there are no examples.

Find examples of the data syntax, find the list of commands, send commands one by one to the board with the I2CWrite command.
So what you wrote is wrong? And I need to find another sheet that shows a list of number commands? What should I look for?
United Kingdom
I don't know if it's wrong or not, I used commands from the list you posted however there are no examples of the correct syntax and I don't have the board to try with so I can't be 100% sure it's correct. As I said late last year I'm trying not to spoon feed as much and trying to get people to figure out as much as they can through guidance in the general area/direction. The above posted explanation along with the correct syntax for the data should be enough to guide you in the right direction and program something.

It's also for the Serial Protocol too, generally I2C and Serial data is the same or very similar but it's always worth finding out.
Im having a lot of difficulty with this board. Which raises the question again. Is there better and easier out there?

And one thing I thought of is, what if we need to use rc receiver outputs rather than multiwii commands?
Discovered that i2c isn't necessarily what I use.

User-inserted image

Wires to the left go to the receiver. If this is correct it means all we need to do is figure out the pwm signal.
United Kingdom
How do you mean figure out the PWM signal?

If this board is what I think it is, which is something that is constantly stabilising flight and has the ability for an external controller to tell it where to move (up, down, left, right, forward, reverse, etc) then what you need to do is get all of the datasheets available for it together and study the connections. The datasheet should have all of the correct wiring instructions etc. which will indicate how to connect it to the EZ-B and what controls to use.

That image doesn't really tell us much.
United Kingdom
No, that was just information on flight modes. You need the actual installation and operation instructions which will explain what you need to do to use the board, from that you can work out how to use the EZ-B with it.
They do have the download on the info page for the multiwii. I downloaded 2.3. Here's just a list of the file names in it.

User-inserted image

If there's something suspicious ill post.
Serial Baudrate:9600(found looking through arduino code)
I posted on the rc forums and here's a response when I asked for serial commands:

"Why not just have the ez-b output a cppm to the MultiWii controller or 4-5 servo pulse (1000-2000us) outputs.
If you are looking for modified MultiWii code to accept serial ASCII than go the the MultiWii forum and ask there. The people who write and modify the MultiWii code do hang on that forum."

Should I go to the multiwii forums and look for modified code?

Here's my reasoning. Rc receivers output pwm or ppm signals. The multiwii connects to the receivers. This means that the multiwii gets the command from the receiver and converts it to be used it own way. That is why I'm trying the ppm/pwm way.
United Kingdom
That seems the simplest method if it can be controlled via PWM and would be pretty straight forward to set up a custom Movement Panel too.
I would think 1000 -2000us means microseconds...the 4-5 position ..on a scale of 1-10? just guessing though
iRobot, here's a quote from what he said that I'm questioning.

"...4-5 servo pulse (1000-2000us) outputs."
iRobot I think your 1000-2000us idea was right.

Quote from another modules description:
"By varying this pulse time in the range of 1000-2000us the position of the servo can be changed"
United Kingdom
@Technopro, I'm trying not to spoon feed you for this, not to be mean or anything but so you learn, understand and have a better experience in the future. You've shown that your getting to understand more and more from when you first joined so I'm trying to push that:)

Do a little bit of reading up on the PWM of the EZ-B, PWM in general and the board you are trying to control by PWM. To be honest I haven't really looked at the board you are trying to use, I looked at the serial commands but that's about it (to be honest I haven't had time to read up on it or even what it does). So I have no idea what varying the PWM would do.

If you understand PWM and you understand the controller you are trying to control via PWM it should all click in to place and you'll get that Eureka moment we all get from time to time.

If you are still struggling with it after reading up on it all I'll have a proper look at the board you are talking about but try to work it out for yourself, you can do it:)
Rich, here's what I know now:
The board connects to 8 digital pins on the ez-b. Each wire runs a channel. Sending pulses of varying times acts as a command or level of the multiwii. The average rc receiver sends commands between 1000-2000us (which I think is actually 1-2ms) in length.