APC220 Wireless and Arduino Mega 2560

Post Reply
Magnetron
Posts: 124
Joined: Tue Jul 05, 2011 4:32 pm

APC220 Wireless and Arduino Mega 2560

Post 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?

Magnetron
Posts: 124
Joined: Tue Jul 05, 2011 4:32 pm

Re: APC220 Wireless and Arduino Mega 2560

Post 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...

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: APC220 Wireless and Arduino Mega 2560

Post 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.

Magnetron
Posts: 124
Joined: Tue Jul 05, 2011 4:32 pm

Re: APC220 Wireless and Arduino Mega 2560

Post by Magnetron »

The best setting is 19200bps for serial trasmission over 19200bps for wireless trasmission... I think.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: APC220 Wireless and Arduino Mega 2560

Post by PatrikE »

You will be shure to avoid overflow that way... ;)

capt
Posts: 54
Joined: Wed Jan 19, 2011 10:54 pm

Re: APC220 Wireless and Arduino Mega 2560

Post 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

Post Reply