APC220 Wireless and Arduino Mega 2560

APC220 Wireless and Arduino Mega 2560

Postby Magnetron » Sun Mar 11, 2012 7:55 pm

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

Postby Magnetron » Mon Mar 12, 2012 10:27 am

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...
Magnetron
 
Posts: 124
Joined: Tue Jul 05, 2011 4:32 pm

Re: APC220 Wireless and Arduino Mega 2560

Postby PatrikE » Mon Mar 12, 2012 4:59 pm

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.
PatrikE
 
Posts: 1606
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: APC220 Wireless and Arduino Mega 2560

Postby Magnetron » Mon Mar 12, 2012 6:15 pm

The best setting is 19200bps for serial trasmission over 19200bps for wireless trasmission... I think.
Magnetron
 
Posts: 124
Joined: Tue Jul 05, 2011 4:32 pm

Re: APC220 Wireless and Arduino Mega 2560

Postby PatrikE » Mon Mar 12, 2012 6:41 pm

You will be shure to avoid overflow that way... ;)
PatrikE
 
Posts: 1606
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: APC220 Wireless and Arduino Mega 2560

Postby capt » Sun Mar 18, 2012 3:46 pm

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
capt
 
Posts: 48
Joined: Wed Jan 19, 2011 10:54 pm


Return to Connecting elements

Who is online

Users browsing this forum: No registered users and 2 guests