Crash Posted May 9, 2023 Author Share Posted May 9, 2023 Slow progress, the Leonardo has just arrived so I will try out the joystick library this week 1 Quote Link to comment Share on other sites More sharing options...
Crash Posted May 10, 2023 Author Share Posted May 10, 2023 The Leonardo works. BUT it isnt very obvious how to load a downloaded sketch or even how to download the sketch. After quite a while I have the board set up as a 5 axis controller and it tested OK. Now to find the sketch I need, that is 4 axis, one 4 way hat switch and maybe 10 or so buttons. Quote Link to comment Share on other sites More sharing options...
Crash Posted May 15, 2023 Author Share Posted May 15, 2023 More progress, I have soldered the 2 pots and have roughly positioned the throttle complete with thumb stick. I will put some photos up soonish in my build thread. 1 Quote Link to comment Share on other sites More sharing options...
Crash Posted May 17, 2023 Author Share Posted May 17, 2023 More progress, as I have decided to mount the Leonardo in the button box on the lever I had to feed the wires from the collective pot up the lever along with the USB cable. This meant taking the plate off the side to get access to the collective pot, and taking the lever off the pivot to allow the cables to be fed up the tube. All back together now. 2 Quote Link to comment Share on other sites More sharing options...
wingflyr Posted May 18, 2023 Share Posted May 18, 2023 Looks great Crash I have one sketch that for my Leonardo. It obviously will not match your config rig, but your certainty can use it as reference if that helps. WINGFLYR_sketch.ino Quote Link to comment Share on other sites More sharing options...
Crash Posted May 19, 2023 Author Share Posted May 19, 2023 Thanks Dennis I will give that a go. Quote Link to comment Share on other sites More sharing options...
wingflyr Posted May 19, 2023 Share Posted May 19, 2023 Let me know if you have questions and I will get back to you as quick as possible Dave. Quote Link to comment Share on other sites More sharing options...
Crash Posted May 20, 2023 Author Share Posted May 20, 2023 Will do Wingy, I have fitted all the switches, so I need to solder the wires and get Leonardo talking to the computer. 1 Quote Link to comment Share on other sites More sharing options...
Crash Posted May 28, 2023 Author Share Posted May 28, 2023 How many buttons and axis are on your sketch Dennis? Quote Link to comment Share on other sites More sharing options...
Crash Posted May 29, 2023 Author Share Posted May 29, 2023 Base now complete and soldering commenced. Quote Link to comment Share on other sites More sharing options...
wingflyr Posted May 29, 2023 Share Posted May 29, 2023 On 5/28/2023 at 8:19 AM, Crash said: How many buttons and axis are on your sketch Dennis? Will check Dave, I will get back to you ASAP. Last two days of work, then I'm free free free 1 Quote Link to comment Share on other sites More sharing options...
Crash Posted May 29, 2023 Author Share Posted May 29, 2023 I remember the feeling Quote Link to comment Share on other sites More sharing options...
wingflyr Posted May 31, 2023 Share Posted May 31, 2023 OK Dave I use this for my radio buttons and rotary's vol up down, channel selection ect for DCS //DEFINITIONS #define ENABLE_PULLUPS #define NUMROTARIES 4 //replace "?" with number of rotary encoders you are using #define NUMBUTTONS 6 //replace "?"with number of buttong you are using #define NUMROWS 1 //replace "?" with number of rows you have #define NUMCOLS 6 //replace "?" with number of columns you have as follows 4 rotary encoder switches push down button 1 rotate 1 left rotate right as in the sketch rotariesdef rotaries[NUMROTARIES] { {0,1,24,25,0}, {2,3,26,27,0}, {4,5,28,29,0}, {6,7,30,31,0}, and 6 buttons //BUTTON MATRIX //first change number of rows and columns to match your button matrix, //then replace all "?" with numbers (starting from 0) byte buttons[NUMROWS][NUMCOLS] = { {0,1,2,3,4,5} 5 potentiometers z axis rx axis ry axis rz axis throttle as you can see in the sketch these equal true //JOYSTICK SETTINGS Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_JOYSTICK, 32, //number of buttons 0, //number of hat switches //Set as many axis to "true" as you have potentiometers for false, // y axis false, // x axis true, // z axis true, // rx axis true, // ry axis true, // rz axis false, // rudder true, // throttle false, // accelerator false, // brake false); // steering wheel Hope that helps Dave. I know it can be confusing. By the way, Your collective is starting to look awesome. Nice piece of engineering their Matie.  Quote Link to comment Share on other sites More sharing options...
Crash Posted May 31, 2023 Author Share Posted May 31, 2023 Thanks Wingy, most of the soldering is now done. My original rubber band on the throttle has now got a split so I will need to come up with a new cunning plan. Might get some photos up tomorrow. Quote Link to comment Share on other sites More sharing options...
Crash Posted June 1, 2023 Author Share Posted June 1, 2023 New cunning plan, I have ordered a 3D printer belt and pulley, Hopefully this will work out. 1 Quote Link to comment Share on other sites More sharing options...
Crash Posted June 5, 2023 Author Share Posted June 5, 2023 The cunning plan worked and the soldering is now done. A few minor jobs to do the sketch and test. Will put up some photos tomorrow. 1 Quote Link to comment Share on other sites More sharing options...
1. DDz Quorum Friar Posted June 5, 2023 1. DDz Quorum Share Posted June 5, 2023 Pictures or it never happened... Quote Link to comment Share on other sites More sharing options...
Crash Posted June 5, 2023 Author Share Posted June 5, 2023 mmkay Quote Link to comment Share on other sites More sharing options...
1. DDz Quorum Friar Posted June 5, 2023 1. DDz Quorum Share Posted June 5, 2023 Can we merge the two threads together. would be easier to follow. text updates then pictures? Quote Link to comment Share on other sites More sharing options...
Crash Posted June 5, 2023 Author Share Posted June 5, 2023 It nearly finished now Colin. I have covered what I did in the Hardware forum. Outstanding jobs are 1/ glue the collar on to the column 2/ drill a hole to feed the usb cable through the button box 3/ do the Arduino sketch 4/ plug the cables into the board and test 5/ fit the assembly into the simpit. 1 Quote Link to comment Share on other sites More sharing options...
Crash Posted June 6, 2023 Author Share Posted June 6, 2023 Dennis, can I use the 3v to power the buttons? I have looked up on google but I cant find out. What about the 5v (pin2) on the 6 pin header, can that be used? Quote Link to comment Share on other sites More sharing options...
wingflyr Posted June 6, 2023 Share Posted June 6, 2023 2 hours ago, Crash said: Dennis, can I use the 3v to power the buttons? I have looked up on google but I cant find out. What about the 5v (pin2) on the 6 pin header, can that be used? Yes the 3V and/or 5Volt supply can be used, but PC USB power supply more then enough for switches buttons and rotaries. I personally stay away from that option as they can create more problems. Generally they are used for motors ( in our case, people run real Aircraft gauges that run with servo motors), digital readers ect, that require more power. Not really needed in our case IMO. Quote Link to comment Share on other sites More sharing options...
Crash Posted June 6, 2023 Author Share Posted June 6, 2023 Thanks Dennis, I will run the pots (4 of them) off the 5v and the buttons off the 3v. I have found out that i can glue the pins off my dupont cables together and make a sort of multi-pin plug. The sketch hasnt been sorted yet, I have one for 5 axis controller. I can edit that down to 4 and then add the button part. I will have 13 buttons, each to a separate pin so I will have to copy paste the routine for this and then test it. 1 Quote Link to comment Share on other sites More sharing options...
Crash Posted June 7, 2023 Author Share Posted June 7, 2023 I have hit a snag. I have soldered the dupont wires to the switches but the wires break very easily. I think I will have to re-wire and use crimped connectors. Wire, soldering tips and terminals ordered. Got to get this sorted! Quote Link to comment Share on other sites More sharing options...
Crash Posted June 8, 2023 Author Share Posted June 8, 2023 Parts will arrive today and I will try to get to grips with the Leonardo. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.