Page 1 of 1

APC220 Wireless and Arduino Mega 2560

Posted: Sun Mar 11, 2012 7:55 pm
by Magnetron
Hi,

I have two APC220 module programmed with AF_NET with 19200bps on wireless parameter and 57600bps on serial interface with same NETID and NODE ID increased with 1 unit between two modules.
I have tyed to connect APC220 wireless module on Arduino Mega 2560 (Flyduino Mega 2560 v2.1).
I connected it on serial 3 and I have modified the source multiwii code on Multiwii.ino like this:

Code: Select all

void setup() {
  SerialOpen(3,57600);
[...]


On Serial.ino I modified all SerialRead(0) statements in SerialRead(3) and all SerialAvailable(0) in SerialAvailable(3).

The gui seem no connect with FC.

Could someone help me?
Could I connect APC220 module connecting ModuleTX to ArduinoRX and ModuleRX to ArduinoTX on Serial 0 without modify the code? Could the code not support Serial 3?

Re: APC220 Wireless and Arduino Mega 2560

Posted: Mon Mar 12, 2012 10:27 am
by Magnetron
I have tryed on Serial 0 and after a little multiwii modification (serial port speed) and multiwii configuration tool modification (serial port speed) it works. Not on other serial ports only on Serial 0!!! But I have a little problem on the graph part of the gui appear the lines but also a text that report a mismatch. I have so tryed to reduce refresh rate from gui (in software) from 25 to 150 and the problem seem to reduce...

Re: APC220 Wireless and Arduino Mega 2560

Posted: Mon Mar 12, 2012 4:59 pm
by PatrikE
I think the problem is the size of data who's sent to Gui.
The Mwii simply pushes all data to it with 57600bps .
Wirless transmition is 19200bps.
The buffer in the APC220 module is to small will overflow the data
making it corrupt for the gui.

Re: APC220 Wireless and Arduino Mega 2560

Posted: Mon Mar 12, 2012 6:15 pm
by Magnetron
The best setting is 19200bps for serial trasmission over 19200bps for wireless trasmission... I think.

Re: APC220 Wireless and Arduino Mega 2560

Posted: Mon Mar 12, 2012 6:41 pm
by PatrikE
You will be shure to avoid overflow that way... ;)

Re: APC220 Wireless and Arduino Mega 2560

Posted: Sun Mar 18, 2012 3:46 pm
by capt
Can I connect my APC220 to serial 0 on my seeduino 1280? or is that taken.. I have tried it briefly but did not get any answer from the F/C according to win GUI?
Set 57600 in configH and 57600 in winGUI.3