element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum The "Ultimate" Raspberry Pi - With analoge stick
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 9 replies
  • Subscribers 706 subscribers
  • Views 1478 views
  • Users 0 members are here
  • raspberry
  • i2c
  • retro
  • adc
  • arduino
Related

The "Ultimate" Raspberry Pi - With analoge stick

thorleif@tjweb.no
thorleif@tjweb.no over 10 years ago

Hello there!

 

I've been struggelign a while now with a handheld console (Retro Game Pi). The tutorial says to use a adapter to make the analoge stick i want to use as a digital 1 and 0 stick. But i really want analoge inputs aswell so i can use it in games which requires an analog stick (Monkey Island on scummvm e.g.).

 

So i started exploring fields i never been on before, i found out using a i2c enabled ADC i could read the values into pyton, using a uinput module to make a joystick move. So i programmed an attiny to read analoge values, pass them on as 2 bytes on i2c into my raspberry pi using python. Somehow i get values around 310 on 1.64 volt and 895 on 3.3v so it dosent seem to work properly (running it on 3.3v).

 

So i give kinda up on what i'm doing and want to ask you guys if you have any tip on how i can get this to work? Both making the joystick analog and digital (dpad function when emulator needs it, or joystick if emulator needs that)z

  • Sign in to reply
  • Cancel
Parents
  • thorleif@tjweb.no
    thorleif@tjweb.no over 10 years ago

    Hehey, got it working now.

     

    Joystick has an attiny85 under sending analog signals over i2c as a ADC, requesting each channel in python then emulating a joystick. That works perfectly image But in emulationstation i configure it and add my 6 buttons (ABXY, Start and SELECT) and dpad on joystick. But entering scummvm the buttons does not work?

     

    The XBOX controller i have works on A B X Y perfectly, the bumpers are start / pause in scummvm. What i wonder is how can i emulate a "xbox" controller with python? Since it seems like thats the "thing". Using uinput i only have 1 joystick button, but on emulationstation it shows that the xbox controller has multiple joystick buttons, how can i do the same?

    Might be stupid question but any info / help would be appriciated! I'm closing in on my goal :)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • thorleif@tjweb.no
    thorleif@tjweb.no over 10 years ago

    Hehey, got it working now.

     

    Joystick has an attiny85 under sending analog signals over i2c as a ADC, requesting each channel in python then emulating a joystick. That works perfectly image But in emulationstation i configure it and add my 6 buttons (ABXY, Start and SELECT) and dpad on joystick. But entering scummvm the buttons does not work?

     

    The XBOX controller i have works on A B X Y perfectly, the bumpers are start / pause in scummvm. What i wonder is how can i emulate a "xbox" controller with python? Since it seems like thats the "thing". Using uinput i only have 1 joystick button, but on emulationstation it shows that the xbox controller has multiple joystick buttons, how can i do the same?

    Might be stupid question but any info / help would be appriciated! I'm closing in on my goal :)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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 © 2026 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.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube