Is it possible to use joystick on Nano?

Hello people,

Is it possible to control a joystick with an arduino nano? What I read from a quick search is that it does not have an HID hub. I do not know what that is. But I just wanted to know if it is possible to do that.

If it is not possible to do that then I will try to program the atmega328p ic chip on the arduino uno.

I am building a small circuit with pushbuttons, joysticks and a bluetooth module then gonna stuff the circuit in a ps3 controller. I know that the joystick will work on the pro micro arduino, but i have so much microcontrollers laying around and dont want to spend money on the pro micro.

Thank you if you reply politely.

Okay thank you very much for the reply. Since the joystick is two sets of potentiometers for x and y axis, then i will use the simple potentiometer code that does mapping for the values just for as it was a potentiometer.

I have built a drone flight controller code previously that works with a simple android app that i built using MitAppInventor tool. The phone app works good to control the drone, but controlling it with a ps3 controller is way cooler :smiley:

Also, I can have that controller control my room lamp and and many other stuff around me.

Hello brother. Your suggestions is close to what I am trying to do. Therefore, i will try them :slight_smile:

Sorry for not being clear, so here is some more detail of what I am trying to do:

Basically the attachment "mycircuit.jpg" shows the circuit I built. I have learned to use the pushbuttons without switch debounce error. Now the only thing i am trying to do is to learn how to you the joystick. After that I will solder the whole circuit inside the ps3 controller frame. I will not be using their PCB board because i have no idea how to hack it. Therefore, I will solder my whole circuit together inside the ps3 frame.

If i do not get successful with the arduino nano. I will be using "choice2.png" which is just the ic chip. Program it then solder it together with the pushbuttons, joysticks and the master bluetooth module. My last option will be buying a promicro arduino to save me some headache on the joystick issue.

Now for the coding part. The code for the controller that i built is simple. The controller will be sending charatchters like: (a,b,c,1,2...etc) via an HC-05 bluetooth module. The drone has arduino uno with a HC-06 slave bluetooth module. The drone know that if it receives certain characters such as 'a' then it turns left, right, up, down or increase and decrease the throttle.

The way the pushbuttons are coded is that they will send a character like 'a' when one is pressed and always a "0" when that button or anyother button is released. Therefore, incase of turning left or right the drone will keep turning until the pushbutton is released. When the pushbutton is release the PID function will be operating with an angle of zero degrees to maintain new position and avoid drifting right or left.

I hope that my explanation is clearer this time. Also, I will add more inputs ports on the nano using some multiplexers to increase the number of the digital inputs. Because the ps3 controller has like 15 pushbuttons and the digital input ports on the nano might not be enough.

Now you're talking about a ps3 controller which is another thing entirely. For that you need a USB host shield and a library that can talk to the ps3 controller

Is it possible to program the ps3's PCB board with a USB host shield? It would be very interesting thing to program their own manufactured PCB boards.

Thank you very much for your helpful replies Delta_G and sorry if I am still light on details again.

choice2.png