HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Aug 30, 2012, 03:07 PM
Registered User
Joined Sep 2010
2,408 Posts
As you say "both" output, does it mean two 3-way switches emulated? can you explain how it works (3 buttons for 3 switch positions or something else).
msev is offline Find More Posts by msev
Reply With Quote
Sign up now
to remove ads between posts
Old Aug 30, 2012, 03:22 PM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
Yes, there are two 3-way switches emulated.....as here:-

Quote:
Originally Posted by IanJ View Post
3-way switch emulation of both the AuxPot outputs when in AuxPot mode.
The 4 buttons next to the top hat now enable the AuxPot outputs to be set to either 0%, 50% or 100%.
1 pair act as up/dn control over AuxPot1, the other pair do the same for AuxPot2.
Last settings used are saved to EEprom.
The output value for both AuxPot's are displayed on the LCD in %.
IanJ is offline Find More Posts by IanJ
Reply With Quote
Old Aug 30, 2012, 03:49 PM
Registered User
Joined Sep 2010
2,408 Posts
So up as going first to middle position if I press again it goes to high position.
msev is offline Find More Posts by msev
Reply With Quote
Old Aug 30, 2012, 04:03 PM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
Quote:
Originally Posted by msev View Post
So up as going first to middle position if I press again it goes to high position.
Yes, and you get feedback with a beep.

PS. Those buttons act ONUP, which means the setting doesn't change till you release the button........and old trick to stop it jumping up again when you don't want it to like when you hold the button too long.

Ian.
IanJ is offline Find More Posts by IanJ
Reply With Quote
Old Aug 31, 2012, 05:59 AM
Registered User
Joined Sep 2010
2,408 Posts
Quote:
Originally Posted by IanJ View Post
Yes, and you get feedback with a beep.

PS. Those buttons act ONUP, which means the setting doesn't change till you release the button........and old trick to stop it jumping up again when you don't want it to like when you hold the button too long.

Ian.
Great!

I haven't worked with libraries before, can you tell me how do I use that library ? Thanks!
msev is offline Find More Posts by msev
Reply With Quote
Old Aug 31, 2012, 06:19 AM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
Quote:
Originally Posted by msev View Post
Great!

I haven't worked with libraries before, can you tell me how do I use that library ? Thanks!
There are a couple of ways, but here's how I like to do it:-

Unzip the library and place the folder containing the files here, i.e. alongside all the other libraries that come with Arduino by default:-

\Program Files\arduino-1.0\libraries

The path may vary slightly depending on the version of the Arduino IDE you have installed. It MUST be either V1.0 or V1.1(latest). You'll never touch that folder again. Then restart the IDE if you have it open.

You'll know it worked when you come to upload my code to your Arduino board and it doesn't error. If you do get errors and they seem to refer to the library then you haven't dropped it in the right place.

Note: You can try uploading even without building anything.......just connect your bare Arduino Mega to your PC then upload the code!

Ian.
IanJ is offline Find More Posts by IanJ
Reply With Quote
Old Aug 31, 2012, 11:15 AM
Registered User
Joined Sep 2010
2,408 Posts
Cool thanks, I didn't know how to "import" the library into Arduino IDE..Thanks for clearing that out, I want to try and compile it to see its size if it goes on arduino mega 1280.
msev is offline Find More Posts by msev
Reply With Quote
Old Aug 31, 2012, 01:22 PM
Registered User
Joined Sep 2010
2,408 Posts
It compiled fine for both boards so should work on both right? They are very similair..

Compiled for mega2560:
Binary sketch size: 41414 bytes (of a 258048 byte maximum)

Compiled for mega1280:
Binary sketch size: 41434 bytes (of a 126976 byte maximum)

How come the sizes are slightly different?
I see you still have a lot room for code
msev is offline Find More Posts by msev
Last edited by msev; Aug 31, 2012 at 01:29 PM.
Reply With Quote
Old Aug 31, 2012, 02:52 PM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
The original Arduino Mega fitted with the 1280 chipset. The only difference between this chip and the newer 2560 chip is the amount of Flash Program memory onboard. The 1280 has 128Kb Flash, while the 2560 has 256Kb Flash. Although I believe the 2560 also has better USB I/O for connecting to the PC.

Ian.
IanJ is offline Find More Posts by IanJ
Last edited by IanJ; Aug 31, 2012 at 03:52 PM.
Reply With Quote
Old Sep 01, 2012, 06:07 AM
Registered User
Joined Sep 2010
2,408 Posts
Ian which voltage does the ppm stream the arduino outputs to the transmitter have (5V or 3.3V)? Probably 5V right?

I think the Turnigy module requires 3.3V - but I have to confirm it first, is it possible to define in code which voltage? (Edit: I believe the level-conversion is already made on the pcb of the rf module, got to look more into that)..And also I believe the mega64 in 9x is giving out 5V to the module as usual.
msev is offline Find More Posts by msev
Last edited by msev; Sep 01, 2012 at 06:41 AM.
Reply With Quote
Old Sep 01, 2012, 07:32 AM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
Quote:
Originally Posted by msev View Post
Ian which voltage does the ppm stream the arduino outputs to the transmitter have (5V or 3.3V)? Probably 5V right?

I think the Turnigy module requires 3.3V - but I have to confirm it first, is it possible to define in code which voltage? (Edit: I believe the level-conversion is already made on the pcb of the rf module, got to look more into that)..And also I believe the mega64 in 9x is giving out 5V to the module as usual.
The Arduino outputs are 5vdc and cannot be determined in the code.

Ian.
IanJ is offline Find More Posts by IanJ
Reply With Quote
Old Sep 02, 2012, 02:44 PM
Registered User
Joined Sep 2010
2,408 Posts
This lcd should work right: http://www.dealextreme.com/p/16-x-2-...-121356?item=2

It seems to have white letters on blue background and is backlit..so quite nice I believe you have one with the same colours..
I know ebay has them 2$ cheaper but atm I don't have an account there

I have another useful feature in mind but I won't bug you since you've done a remarkable job already and also we don't have any available buttons more ...Also that feature would be only useful on maiden and is otherwise useless (and is also just an redundant feature)..So I won't bug you
msev is offline Find More Posts by msev
Reply With Quote
Old Sep 02, 2012, 03:27 PM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
Quote:
Originally Posted by msev View Post
This lcd should work right: http://www.dealextreme.com/p/16-x-2-...-121356?item=2

It seems to have white letters on blue background and is backlit..so quite nice I believe you have one with the same colours..
I know ebay has them 2$ cheaper but atm I don't have an account there
Don't buy an LCD with backlight.......it'll just swallow your battery.
The LCD I have in my joystick is just plain vanilla, the one with blue background was only for testing/development (which had a backlight).

Here's the type you need:-
http://www.ebay.co.uk/itm/16x2-1602-...item45f9020719

Ian.
IanJ is offline Find More Posts by IanJ
Reply With Quote
Old Sep 03, 2012, 12:45 PM
Registered User
Joined Sep 2010
2,408 Posts
Ian do you maybe have one of those at home that you don't use on a project? one spare that you could sell me...
msev is offline Find More Posts by msev
Reply With Quote
Old Sep 03, 2012, 03:22 PM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
Quote:
Originally Posted by msev View Post
Ian do you maybe have one of those at home that you don't use on a project? one spare that you could sell me...
Not worth the postage!, you can buy cheaper on Ebay.

Ian.
IanJ is offline Find More Posts by IanJ
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion RC Radio Tx - Re-inventing the wheel! IanJ DIY Electronics 345 Mar 18, 2013 02:44 PM
Sold Immersion RC 600mW 5.8 TX Version 1 $50 shipped. nybeechpilot FPV Equipment (FS/W) 2 Jun 02, 2012 06:36 PM
Discussion Re inventing the internal combustion engine UlteriorModem Life, The Universe, and Politics 10 Apr 11, 2012 05:24 AM
Discussion Re-inventing the wheel philgib Blimps 5 May 25, 2006 06:42 PM
Wanted WTB AeroFly Professional Deluxe USB Interface Version RC Flight Simulator for futaba heliguy Aircraft - General - Radio Equipment (FS/W) 0 Oct 20, 2005 02:21 PM