Go Down

Topic: Problems with R/C 6ch transmission (Read 5376 times) previous topic - next topic

DuaneB

Hi,
   Can you PM me your sketch so that I can make a suggestion based your current structure ?

Duane B
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

Carlos mononoke

Good morning,
the sketch have 49 pages of code,i was looking in github and google proyect for upload there but it was a little dificult for me( i supposo that it will be easy like a dropbox or something like this....)
if you sendme one email to alehop@mononokeproducciones.com I´ll send you the .pde code.
i am using in this code:

1 arduino Mega 2560
1 4x3 matrix keypad
1 lcd
1 sd21 servo controller
3 thumb joystick (6 potentiometers)
8 buttoms
1 udrive microSDcard (2gb uSD card)
1 RGB led

and now I am changuin to only 1 thumb joystick and 5 buttoms and 6 chanels r/c control.

the structure is:

one menu with 3 posibilities:

PLAY
REC
Config

and inside of this posibilities you have more posibilioties:

Play:

play from memory,
play from the joysticks
and now i want to add here another posibility from RC

Record:

record move  (here I need to add the rc control too)
record a secuence of pre recorder movement
erase movement
erase secuence

config:
Format sd card
calibrate joystick
---------------------------------------------------------------------------------------------

I explain all this becouse went I send you the code you will see that is uncoment, only have comment for me and in spanish...
When I finnish I want to document it in a blog but now... is a little unreadable... sorry

For this reason I only need that arduino hear the RC control in two moments.what i am thinkin is the gMode variable for me only have two posibilities so it is a boolean variable,but how can i create one tath have more posibilities(Manual,RC1,RC",RC)

thanks for your interest!!!!!

Carlos mononoke

Hi,
This weekend I was studying the diference between a class,a structure,and another posibility that is only define a int variable(gMode), and define no_RC =0;RC1=1;RC2=2.....;
and I could use Mode names.
But the thing is allways the calc rutine will be stopping for do the micro second pulse count independently if this is needed or not, so I would try to implement all together and see what happend if I have problems I should try to use detachInterrupt;and see how many times I can use before arduino´s memory is full,and when this happend make a reset.

DuaneB

A better approach is to disable the interrupts at a hardware level.

I have been busy getting two blog posts and videos out this weekend but will get to modes and switching the signal source in a day or two.

I will suggest the ability to temporarily enable and disable interrupts on specific pins to the pin change int guys, if they are not keen i will add it as n externala helper class.

Duane B
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

Carlos mononoke

When you say disable the interrupt at a hardware level, you mean that power off the transmitter no?? only when you are inside of the rc_mode power on.

Duane I want to understand better how to work with class, do you recomend me some thing for read or see??? becouse I was reading the book beguining with processing but i think the classes in arduino are a little bit diferent.

thanks!!!!

DuaneB

Hi, no transistors, the arduino has a set of registers which enable or disable each pin for generating pin change interrupts. If you disable the interrupt at this level you can leave interrupts attached and disable specific pins until you need them. You can then enable/disable as often as you want with no overhead when they are not in use and no memory leaks from attach/detach

Im in Ethiopia today so no time to dig out the register names.

Duane B

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

DuaneB

Hi,

Here is a link to the thread where we have been disussing the problem with using detach in pinchangeint. As you can see greygnome has confirmed the issue and is planning to add support for the enable/disable mechanism i suggested as a fix.

http://arduino.cc/forum/index.php/topic,87195.0.html

Duane B

rcarduino.blogspot.com

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

Go Up