Use Arduino as a PC Controller

Hello Reader,
I am trying to make a controller of sorts using three potentiometers and some buttons that I can connect to a PC. I want to be able to set the buttons and potentiometers to do certain things on my PC. Is this possible? I am using an Arduino UNO, and just regular buttons. Maybe this is possible using Serial.write("state") (with "state" being the position of the button or potentiometer). I just want to be able to plug the Arduino setup into my PC (preferably via USB) and use it correctly when done.
Any help is appreciated! Thank you! :slight_smile:
God Bless!

Mayby! Start by explaining what you want to control and how you are planning on interfacing it. What PC do you have, what OS, What software is going to respond. A lot more information is needed to properly answer your question. You also need to define what use it correctly when done is.

sounds like you want to use the Arduino as an custom control interface that communicates with the PC over serial.

sure it can be done. post your code

1 Like

I want to control multiple things, such as a single PC game, or a 3D CAD program. I would be fine with programming each one individually. (E.g. programming a setup for the game and programming a setup for the CAD program)
I use the Windows 11 OS.
I am unsure of how to interface it. I would like to stick with Arduino if possible, but I can also use Python if required.
I have a Cyberpower PC, what other PC info do you need?
I hope this answers your questions, just reply to me again if I left something out.
Thank you!

I would really like for it to communicate over serial, yes, but I'm not sure how to turn that into a computer action. (Python?)
Also, I am just beginning at this project, I have not started coding it yet. I wanted to first see if I could do it with the equipment I have, and besides, I don't even know how to code it, because I don't know if I have to code things differently when it connects to a computer to send commands. (Sorry, kinda blabbered on there, hopefully it makes sense.) :stuck_out_tongue_winking_eye:
Thank you!

presumably there some program running on the PC that would use the Arduino as an interface

What kind of commands do you have in mind?
Usually programms are controlled by keyboard and/or mouse actions. There are Arduino boards that can act as a mouse or keyboard when connected via USB. E.g. the Leonardo or Micro ( boards with a native USB interface).

Well, for the game, I would program a steering wheel, two pedals and different buttons, all of which I can set the function of each sensor, as long as it recognizes it as a controller and receives the position of the input. (High/low, potentiometer variable)
As for the CAD, I want different buttons to control orbit, scale, move, rotate, etc.
I need to stick with the Arduino UNO, I don't want to go buy a new board. I can buy minor things, but preferably not a new board right now.

Sorry, haven't looked at the post for a few months. Still interested in the project though.
Did you have any programs in mind?.. what type of programs?

In reality, you are the one to find PC programs that utilize the old keyboard commands, if you an using Microsoft windows. Much of windows graphics just pretend to be a keyboard. If you use an Arduino that can emulate a mouse/keyboard, then you may be able to discover the windows programs that will work for you.

I know that I need to be the one looking for the programs, I just thought that perhaps he already had some that he was using. I have found a couple that I will try, but I was just wondering if maybe someone had an idea to help get me started.

See if you can find the keystrokes to control the original Windows programs. They still work to some extent.
Try them with various programs and record the actions that result. They will be the "key" to using an Arduino to emulate those keystrokes.

I would do that, but it would only work so far... Like, I want to have a potentiometer (Variable float) control what a key (non-variable bool) would normally control, but if I were to connect one of those xbox handheld things (Which I don't have, just an example) it would use a variable value as well, since it would be a joystick. I hope that made sense?

Also....I liked the pun XD

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.