0

As a novice, I would like to create a small breadboard with 5 items on it. 3 toggle buttons, and two constant spin (ie. no stop at 360 degrees) knobs.

Is then like the bottoms to send what ever key stroke (single key pee click) to the pc as if it was from a keyboard (maybe even a shift+key?)

And the knobs send keystrokes too. On each “click” as I don’t want smooth knobs. Ones that kinda of click per degree. Not sure how to explain that.

It’s for Flight Simulator. Doing it with a mouse, from distance, with small buttons is challenging. And twisting knobs with the mouse in bumpy conditions is even worse.

So planning on using my Nana, connected to a USB port for Power and signal.

Can anyone guide me in the right direction? Would I need 3rd party software to convert signals to keystrokes on the pc?

I think there is a keyboard library - but from what I read, it takes over your keyboard. That is, once the Arduino is connected and listening - the main keyboard no longer functions. Is that a misunderstanding? I need both to be operational.

I’m guessing something like this as it has “positions”. https://www.ebay.com.au/itm/Rotary-Encoder-Module-Arduino-Compatible/232624628710?hash=item36298223e6:g:JIIAAOSwg31aVFVW

2

As a novice, I would like to create a small breadboard with 5 items on it. 3 toggle buttons, and two constant spin (ie. no stop at 360 degrees) knobs.

Those knobs are called "Rotary Encoders".

Is then like the bottoms to send what ever key stroke (single key pee click) to the pc as if it was from a keyboard (maybe even a shift+key?)

Then you really want an Arduino with a "native" USB connection, like the Leonardo or Micro.

Can anyone guide me in the right direction? Would I need 3rd party software to convert signals to keystrokes on the pc?

Not with a Micro or Leonardo - you just use the Keyboard.h library. If you want to use your Nano then yes, you can only talk serial, and you will have to have some third party software that interprets serial commands and injects keyboard signals into your OS. I think there's some Python projects around that do that kind of thing. Or there is "professional" software, like 232key that can do it for you.

5
  • Thanks for that. I can get a different board if it’s more suitable for the application. Would this take over the keyboard? Or would the keyboard still be fully functional while my project is connected and sending keystrokes? – Craig Nov 2 '20 at 20:39
  • connect two keyboards to your PC and see – jsotola Nov 2 '20 at 20:43
  • 1
    @Craig Your keyboard would be fully functional. You can connect multiple keyboards to a computer and they all work as one keyboard. – Majenko Nov 2 '20 at 20:43
  • Thank you, @majenko. I’ll order a Arduino Micro (seems to be the new version of the Leonardo?) and the Rotary Encoder I linked in my post. Your post indicated I don’t need software on the pc? Basically connect the Micro, it will get power off the same USB that is sending the signal - and write the code to send the commands using Keyboard.h? – Craig Nov 2 '20 at 20:51
  • 1
    @Craig The Micro is to the Leonardo what the Nano is to the Uno. With that you don't need software on your PC. Just Keyboard.begin(); and Keyboard.println("format c:"); arduino.cc/reference/en/language/functions/usb/keyboard – Majenko Nov 2 '20 at 20:54
1

The twisty click per degree thing is called a rotary encoder.

You can already send serial commands to a computer, so to keep it simple, I'd try to find a way of turning the serial commands into a keyboard click.

1
  • Thanks. I think that’s the hard part. Converting things from the board, into a signal that the pc sees as a keystroke. I’ll look around. – Craig Nov 2 '20 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.