PPM SUM RX with Arduino Mega / Flyduino [pin change]

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

PPM SUM RX with Arduino Mega / Flyduino [pin change]

Post by warthox »

hi,

ppm sum signal input is on pin19 for the mega. but this pin is used on the flyduino.
how do i have to change the code to be able to connect the ppm sum signal to THR pin [A8] like with the pro mini?
i looked at the code [1preter7] but as im not a coder its not really clear what to do.

any suggestions?

regards markus

miniquad
Posts: 65
Joined: Wed Mar 23, 2011 8:17 pm

Re: PPM SUM RX with Arduino Mega / Flyduino [pin change]

Post by miniquad »

Hi Markus,
Looking at the code, it seems to me that you will need to modify the following line for the pin change:

line 242: #define PPM_PIN_INTERRUPT attachInterrupt(4, rxInt, RISING); //PIN 19

Here the number 4 indicates which pin of the arduino mega is used to capture the ppm signals. To change this, just find the corresponding pin number for THR pin [A8] as you mentioned and replace 4 with that. But this is what I understand from looking at the code, nothing tested or confirmed. 8-)

ben123
Posts: 4
Joined: Tue Apr 05, 2011 2:43 pm

Re: PPM SUM RX with Arduino Mega / Flyduino [pin change]

Post by ben123 »

Hi Markus!

I had a similar question for the Pro Mini. Finally found the info I was looking for here :

http://www.arduino.cc/en/Reference/AttachInterrupt

It seems that the Mega chip has 6 pins that are capable of an external interrupt:

Most Arduino boards have two external interrupts: numbers 0 (on digital pin 2) and 1 (on digital pin 3). The Arduino Mega has an additional four: numbers 2 (pin 21), 3 (pin 20), 4 (pin 19), and 5 (pin 18).


So I think you can use any of those pins as long as they're not being used for something else and are broken out :)

Ben.

User avatar
Loosi
Posts: 63
Joined: Sat Aug 20, 2011 8:31 pm
Location: Germany (HSK)
Contact:

Re: PPM SUM RX with Arduino Mega / Flyduino [pin change]

Post by Loosi »

Hi !

Someone got PPM working with the Flyduino Mega board?

Greetings
Daniel

Siberian
Posts: 2
Joined: Mon Mar 14, 2011 11:10 pm

Re: PPM SUM RX with Arduino Mega / Flyduino [pin change]

Post by Siberian »

Hi;

works with receiver connected to Serial 1...

Greetz

Peter

User avatar
Loosi
Posts: 63
Joined: Sat Aug 20, 2011 8:31 pm
Location: Germany (HSK)
Contact:

Re: PPM SUM RX with Arduino Mega / Flyduino [pin change]

Post by Loosi »

Thanks, i have seen it on the schematic, i thought it is only for the Spektrum that works serial or something like this.
Working perfect with a standard ppm receiver. Just connect the PPM signal to RX on Serial 1 :)

monkey
Posts: 20
Joined: Mon Dec 31, 2012 8:06 pm
Location: York, PA USA
Contact:

Re: PPM SUM RX with Arduino Mega / Flyduino [pin change]

Post by monkey »

Loosi wrote:Thanks, i have seen it on the schematic, i thought it is only for the Spektrum that works serial or something like this.
Working perfect with a standard ppm receiver. Just connect the PPM signal to RX on Serial 1 :)


Actually now in the Dev build you can use the throttle channel or A8 with PPM,

Check out:
http://www.multiwii.com/forum/viewtopic.php?f=8&t=2868

I just loaded it up and bench tested it today, works great.

So we no longer have to use a Serial Port for PPM sum on a mega board. I am using a Flyduino Mega myself but this code will work on any mega board.

Post Reply