1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Question Arduino Leo Help, Diy button box, Shifter control and Handbrake pot

Discussion in 'DIY peripherals' started by Rav3n87, Sep 16, 2020.

  1. Rav3n87

    Rav3n87 Member

    Joined:
    Sep 9, 2020
    Messages:
    31
    Balance:
    250Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Hello,

    Absolute total noob here with Arduino,

    I am trying to create a basic button box with a few key buttons for Iracing at this stage, i would like to be able to plug the h pattern/sequential shifter i have built into the box along with a potentiometer controlled handbrake

    Total buttons needed are:

    Button box = 16
    Shifter = 9 7 for the h pattern, flick a switch and it sends to 2 other pins
    Handbrake Pot

    I can physically do all the wiring/assembly ect easy peasy but i am starting to get frustrated with digging through post after post and trying different things and modifying code that i don't really understand to well, it doesn't seam to be sinking in atm

    If anyone with far greater knowledge can point me in the right direction i would be very grateful, I by no means am asking anyone to spoon feed me the code though lol
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    15,374
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    113,009Coins
    Ratings:
    +9,090 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  4. yellofella

    yellofella Member

    Joined:
    Aug 8, 2011
    Messages:
    90
    Occupation:
    builder
    Location:
    UK
    Balance:
    707Coins
    Ratings:
    +67 / 0 / -0
    My Motion Simulator:
    3DOF, SimforceGT
    Hi buddy. Have you seen this buttonbox in the FAQ's.
    https://www.xsimulator.net/community/threads/diy-arduino-buttonbox.8302/
    It can do 25 buttons as well as 4 encoders and could be easily modified for your needs. On the leonardo you could connect your switch to A4 and use it as a digital pin but would need a resistor in series and some debouncing to make it work properly as well as your hand brake pot to A5.
    Hope this helps
  5. Rav3n87

    Rav3n87 Member

    Joined:
    Sep 9, 2020
    Messages:
    31
    Balance:
    250Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    oh crap i didn't check the faq's,

    i did see that thread but i was having trouble compiling it, had a mate come over and rejogged our memorys of playing with gta san andreas code which is very similar so im currently reading through the joystick library readme file, i think i may have started to make sense of it all again, will keep ya's posted
    • Like Like x 1
  6. Rav3n87

    Rav3n87 Member

    Joined:
    Sep 9, 2020
    Messages:
    31
    Balance:
    250Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Update:

    After a few hours of looking over different peoples coding and the keypad and joystick library, I have managed to make sense of the functions i was trying to achieve, grabbed a few bits of a bunch of different code and edited to suit my needs, Pleased to say i have managed to get it all working,

    Thinking about adding 2 rotary encoders in now haha

    So far i have:

    27 buttons and 1 analoque Pot input
    3 rows
    9 columns

    Reason for this is my shifter has 7 micro switches and i need a dpdt switch on 3rd and 4th for the sequential side of it totalling 9 pins, Just makes it easier to wire this way



    Wired up the micro switches in my shifter last night and hammered the crap out of them, System reacts as expected no issues,

    Headed to jaycar this arvo to grab a few plugs and what not to properly connect everything neatly
    • Like Like x 1
  7. Rav3n87

    Rav3n87 Member

    Joined:
    Sep 9, 2020
    Messages:
    31
    Balance:
    250Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Update,

    Button box done....

    All working Yay!

    Photo attached

    Also a photo of my H pattern/sequential


    Thanks for pointing me in the right direction guys

    Attached Files:

    • Like Like x 1