element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum DIY Controller
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 4 replies
  • Subscribers 391 subscribers
  • Views 593 views
  • Users 0 members are here
  • programming.
  • arduino
Related

DIY Controller

vasi_t
vasi_t over 7 years ago

Hi Guys,

i have a question and I'm sorry if there is a solution on the internet already, I'm just not able to find it. I bought a pro micro with the atmega32u4 chip. I not a Programmer but I need a code where I can use a Joystick and 12 buttons so I could do my own Controller for my hobbyproject with retropie. So my question is if anyone has a code like that maybe or does know from where I can get it?  I tried what its listed on this side : Arduino Leonardo/Micro As Game Controller/Joystick: 10 Steps      but I dont know how to add any button or make my joystick work or I tried to make what says on the arduino site with keyboard layout I just can't to do it. I really need help and I'm thankfull for any help from you guys.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

  • Sign in to reply
  • Cancel

Top Replies

  • beacon_dave
    beacon_dave over 7 years ago +2
    Have you taken a look at this tutorial ? Turn your ProMicro into a USB Keyboard/Mouse https://www.sparkfun.com/tutorials/337 Also perhaps take a look at this RetroPie project: PIK3A: The Raspberry Pi 3…
  • beacon_dave
    beacon_dave over 7 years ago in reply to vasi_t +2
    Looking at the PIK3A code then: // Joystick Up - Arrow Up Key if (joystickUp == LOW) { Keyboard.press(218); } else { Keyboard.release(218); } // Joystick Down - Arrow Down Key if (joystickDown…
Parents
  • beacon_dave
    beacon_dave over 7 years ago

    Have you taken a look at this tutorial ?

    Turn your ProMicro into a USB Keyboard/Mouse

    https://www.sparkfun.com/tutorials/337

     

    Also perhaps take a look at this RetroPie project:

    PIK3A: The Raspberry Pi 3 IKEA Retro Gaming Table

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • beacon_dave
    beacon_dave over 7 years ago

    Have you taken a look at this tutorial ?

    Turn your ProMicro into a USB Keyboard/Mouse

    https://www.sparkfun.com/tutorials/337

     

    Also perhaps take a look at this RetroPie project:

    PIK3A: The Raspberry Pi 3 IKEA Retro Gaming Table

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
Children
  • vasi_t
    vasi_t over 7 years ago in reply to beacon_dave

    I will gona try the first one out. Thanks for now. But do you know what i need to write if i want to put the arrow up or down button if i press it?

    And I already tried with the code from the retropi table. Unfortunatley I wasn't able to make it so that I can use it with mine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • beacon_dave
    beacon_dave over 7 years ago in reply to vasi_t

    Looking at the PIK3A code then:

     

    // Joystick Up - Arrow Up Key  
    if (joystickUp == LOW)
    {
       Keyboard.press(218);  
    }  
    else 
    {  
        Keyboard.release(218);  
    } 
    // Joystick Down - Arrow Down Key 
    if (joystickDown == LOW) 
    { 
       Keyboard.press(217);
    }  
    else 
    {  
       Keyboard.release(217);  
    }

     

    More codes listed at: 

    https://www.arduino.cc/reference/en/language/functions/usb/keyboard/keyboardmodifiers/

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • vasi_t
    vasi_t over 7 years ago in reply to beacon_dave

    Oh, sorry. Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube