Arduino Pro Micro Gameplay

Discussion in 'Embedded Systems and Microcontrollers' started by JustMe234, Jan 28, 2018.

  1. JustMe234

    Thread Starter Member

    Feb 25, 2017
    43
    0
    Hello,
    I want to build a gamepad/joystick with many inputs: potentiometers, buttons, joysticks. I have an Arduino Pro Micro. I think i should use an multiplexer for input more than 4 analogs. But i dont know how to make it. Does anybody have any idea?
     
  2. ScottWang

    Moderator

    Aug 23, 2012
    6,762
    1,047
    You can use paint to draw a block diagram including input/output pins and save it as 800x600 .png to show what you want to do and we can discuss later to solve your problem.

    The hardware maybe more easy to solve, how about the software, do you want to design by yourself or pay the bill to hire someone to design for you?
     
  3. JustMe234

    Thread Starter Member

    Feb 25, 2017
    43
    0
    Sorry if i was unclear.
    Here is the schematic i will use for the hardware.
    I have work with arduino in past just for small projects RGB stuff.


    In schematic i will use an multiplexer for expand the analog input. The part when i got stuck is programing the Arduino to act on pc like a joystick. Yeah i will cover the programing part by myself. I just want to make it to work for one button and one potentiometer and than i can expand.
     
    Last edited: Jan 29, 2018
  4. ScottWang

    Moderator

    Aug 23, 2012
    6,762
    1,047
    I have that board too, it has 6 analog inputs on board(A0~A5) already, how many analog inputs do you need for your application?

    You can use CD4051 or CD4067 to expand the analog inputs, if that is not enough then you can add a 74HC138 and some more CD4051 or CD4067 to expands more analog inputs, the example of CD4051(x5) + 75HC138.

    There is another example for the op amp + CD4051 expanding as this.

    CD4051 : 8-Channel Analog Multiplexer/Demultiplexer.
    CD4067 : 16-Channel Analog Multiplexer/Demultiplexer.

    The CD74HC4050 just a buffer, what do you used that for?
     
  5. JustMe234

    Thread Starter Member

    Feb 25, 2017
    43
    0
    I have put wrong chip in schematic mine is CD74HC4051E. The reason that i need more than 5 analog inputs is because i want the Arduino to be a HID device so i can play games like Farming Simulator or Euro Truck simulator. Games who need much buttons.
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    6,762
    1,047
    Use 74HC138 can be expending to 8 CD74HC4051E, and it has 64 inputs.
    Use 74HC138 can be expending to 8 CD4067, and it has 128 inputs.
    Use 74HC154 can be expending to 16 CD4067, and it has 256 inputs.

    You could according to the example of CD4051(x5) + 75HC138 to draw your circuit.
     
Loading...