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

DIY Arduino Buttonbox

Discussion in 'DIY peripherals' started by TOPMO3, Mar 28, 2016.

  1. TOPMO3

    TOPMO3 Active Member

    Joined:
    May 12, 2015
    Messages:
    133
    Location:
    Russia
    Balance:
    893Coins
    Ratings:
    +201 / 0 / -0
    Hi Diego,
    the sketch supports only 4 encoders. You can try to modify it, but I didn't test 6 encoders.
    Also I wrote firmware for stm32 dev board which suppots up to 11 encoders - link
  2. Artois

    Artois New Member

    Joined:
    Dec 17, 2016
    Messages:
    9
    Location:
    Hinesville, GA
    Balance:
    246Coins
    Ratings:
    +3 / 0 / -0
    Thanks for post. I would like the use Ard board to make a dashpanel.
  3. Borja

    Borja New Member

    Joined:
    Jun 25, 2015
    Messages:
    12
    Location:
    Loja
    Balance:
    133Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino
    Hello, could you share the schematic to create PCB ?, thanks
  4. razzor13bt

    razzor13bt Member

    Joined:
    Jan 10, 2017
    Messages:
    32
    Occupation:
    automotive technician, sales manager.
    Location:
    Durban, South Africa
    Balance:
    393Coins
    Ratings:
    +8 / 0 / -0
    Hi. thanks for this info.
    I am a newb to the sim racing community on the DIy side.
    I have built a button box and initially bought a ARM developement board. was advised Arduino would be better hence a friend suggested this thread.
    I am at work at present and will post the sketch info later this evening.
    I am having a hassle loading the sketch to the Pro Micro. One i have is blue in colour but think its a generic copy.

    With Arduino IDE 1.8.1 get error:
    "exit staus 1"
    "Error compiling for board Ardino/Genuino Micro."

    a friend advised reinstalling a older Arduino IDE.
    I then installed 1.6.6
    then i get the following error :
    "compilation terminated."
    "exit status 1"
    "Error compiling."

    any response or guidelines welcome.
  5. TOPMO3

    TOPMO3 Active Member

    Joined:
    May 12, 2015
    Messages:
    133
    Location:
    Russia
    Balance:
    893Coins
    Ratings:
    +201 / 0 / -0
    Hi @razzor13bt

    what version of sketch did you try? buttsimjoy_02b is succesfully compiled in IDE 1.8.1
    Did you install keypad and joystick libraries?

    ps. ARM dev board is also fine. If its something like stm32f103 you can check this
    • Informative Informative x 1
  6. razzor13bt

    razzor13bt Member

    Joined:
    Jan 10, 2017
    Messages:
    32
    Occupation:
    automotive technician, sales manager.
    Location:
    Durban, South Africa
    Balance:
    393Coins
    Ratings:
    +8 / 0 / -0
    I think i have a issue with drivers or something. I am using win10. Using the Stlink for the other project i also am not connecting. It initially connects and then stops. After a few seconds the computer keeps making the sound for a new connected device. Busy reading up as much as i can at work.
  7. razzor13bt

    razzor13bt Member

    Joined:
    Jan 10, 2017
    Messages:
    32
    Occupation:
    automotive technician, sales manager.
    Location:
    Durban, South Africa
    Balance:
    393Coins
    Ratings:
    +8 / 0 / -0
    TOPMO3 can you explain how to install said libraries please.
    i followed the Arduino guide and installed a keypad library but not having any luck with the joystick library.
    been reading how to load sketches but some info apply to the newer IDE software.
  8. razzor13bt

    razzor13bt Member

    Joined:
    Jan 10, 2017
    Messages:
    32
    Occupation:
    automotive technician, sales manager.
    Location:
    Durban, South Africa
    Balance:
    393Coins
    Ratings:
    +8 / 0 / -0
    edited.
  9. TOPMO3

    TOPMO3 Active Member

    Joined:
    May 12, 2015
    Messages:
    133
    Location:
    Russia
    Balance:
    893Coins
    Ratings:
    +201 / 0 / -0
    Just download Joystick library and unzip it into your Documents\Arduino\libraries folder.

    It should looks like this:
    Untitled3.png

    Restart IDE and libraries shuold be listed in Library Manager:
    Untitled3.png


    If you cant see joystick libraries in the Library Manager, try to install it through IDE's menu Sketch->Include Library->Add .zip Library
    • Informative Informative x 1
  10. razzor13bt

    razzor13bt Member

    Joined:
    Jan 10, 2017
    Messages:
    32
    Occupation:
    automotive technician, sales manager.
    Location:
    Durban, South Africa
    Balance:
    393Coins
    Ratings:
    +8 / 0 / -0
    hi. i got it working now but have the following error coming up.

    Attached Files:

  11. TOPMO3

    TOPMO3 Active Member

    Joined:
    May 12, 2015
    Messages:
    133
    Location:
    Russia
    Balance:
    893Coins
    Ratings:
    +201 / 0 / -0
    Ok, it seems Matthew changed his joystick library.
    best option should be to modify my sketch according to the newer library version, but I haven't arduino board to test it right now.

    So can you please try to replace the library by older version?

    Attached Files:

    • Like Like x 1
    • Useful Useful x 1
  12. razzor13bt

    razzor13bt Member

    Joined:
    Jan 10, 2017
    Messages:
    32
    Occupation:
    automotive technician, sales manager.
    Location:
    Durban, South Africa
    Balance:
    393Coins
    Ratings:
    +8 / 0 / -0
    Thank you. that worked perfectly. now to reassemble the button box. much appreciated.
    • Like Like x 1
  13. Runner2

    Runner2 New Member

    Joined:
    Jan 28, 2017
    Messages:
    2
    Location:
    Germany
    Balance:
    223Coins
    Ratings:
    +1 / 0 / -0
    Hello!
    I have some Encoders from ALPS with a very good feel and there are sending 2 impules with 1 click. So, with youre code, the encoders only sends a signal with the second click.
    Is there a way to get this working with every click?

    Thank you!
    Regards
  14. TOPMO3

    TOPMO3 Active Member

    Joined:
    May 12, 2015
    Messages:
    133
    Location:
    Russia
    Balance:
    893Coins
    Ratings:
    +201 / 0 / -0
    Hi @Runner2
    maybe halfstep encoder processing can help in your situation.
    Can you try this attached sketch?

    ps. Can you post a model of your encoders? I'd like to try encoders with good "click" feeling

    Attached Files:

    • Useful Useful x 1
  15. Runner2

    Runner2 New Member

    Joined:
    Jan 28, 2017
    Messages:
    2
    Location:
    Germany
    Balance:
    223Coins
    Ratings:
    +1 / 0 / -0
    Many many thanks! Your sketch is working perfectly :cheers

    My encoders:
    ALPS-Encoder EC11B15244BA
    • Like Like x 1
  16. Pelice

    Pelice New Member

    Joined:
    Jan 5, 2017
    Messages:
    2
    Location:
    Italy
    Balance:
    167Coins
    Ratings:
    +1 / 0 / -0
    great project!

    the joypad sketch doesn't work for me.
    I've got this error: "joystick was not declared in this scope"

    to solve the problem i've got to add these lines before setup():
    // Create the Joystick
    Joystick_ Joystick;

    Now all works fine!
    • Like Like x 1
  17. ouarlux

    ouarlux New Member

    Joined:
    Dec 29, 2016
    Messages:
    9
    Location:
    france
    Balance:
    239Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino
    Cool project guy thx,
    i was looking how to do one and your look cool

    just is it possible to add LCD 16x2 to read info ? or the code do not allow it ?
  18. TOPMO3

    TOPMO3 Active Member

    Joined:
    May 12, 2015
    Messages:
    133
    Location:
    Russia
    Balance:
    893Coins
    Ratings:
    +201 / 0 / -0
    Only max7219-based display is supported. But Its not very difficult to add support for any other display your have, there are dozen of arduino's libraries already written
  19. ouarlux

    ouarlux New Member

    Joined:
    Dec 29, 2016
    Messages:
    9
    Location:
    france
    Balance:
    239Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino
    ok topmo3 thx
    i ll see to add max7219 ;) and try to code for the LCD1602
  20. Lightman

    Lightman New Member

    Joined:
    Feb 28, 2017
    Messages:
    4
    Location:
    Germany
    Balance:
    196Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino
    Hello I'm quite new here and beginners about the Arduino. I would like to implement the project with the Leonardo and am with the pin assignment very unsafe I have looked at the pinouts of both arduinos and then made the circuit and would like to ask if that is so right. Sorry for the bad Google English

    Attached Files: