1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. 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!
  3. 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
  4. 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 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 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. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,464
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,620Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  3. yellofella

    yellofella Member

    Joined:
    Aug 8, 2011
    Messages:
    94
    Occupation:
    builder
    Location:
    UK
    Balance:
    743Coins
    Ratings:
    +84 / 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
  4. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 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
  5. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 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
  6. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 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 2