AndunHH / spacemouse

Repository for a 6 degree of freedom (DOF) mouse, which emulates a 3Dconnexion "Space Mouse Pro wireless". It is based on four joysticks with additional keys or an encoder
Other
91 stars 16 forks source link

Is it possible to operate the short key when I click the encoder switch? #62

Closed starletzzang closed 3 days ago

starletzzang commented 6 days ago

How are you? I have one more question.

I installed the encoder and the zoom in/out works normally.

I connected the encoder switch to pin 7.

Is it possible to operate the short key when I click the encoder switch?

Below is the wiring diagram you provided. The button on the Encoder is set to D7.

![Uploading 1.jpg…]()

AndunHH commented 6 days ago

I can't see the picture of the schematic. Maybe you need to wait a few seconds, before clicking send.

What due you mean with the "short key"? I tested the encoder switch successfully just like a regular key. The controller doesn't need to know if the switch is physically at the encoder or not.

starletzzang commented 6 days ago

I can't see the picture of the schematic. Maybe you need to wait a few seconds, before clicking send.

What due you mean with the "short key"? I tested the encoder switch successfully just like a regular key. The controller doesn't need to know if the switch is physically at the encoder or not. 1

In simple terms, it means the action that occurs when you click on the encoder that points to the finger below.

KakaoTalk_20241020_195856500

AndunHH commented 4 days ago

Ah, yes. Now I know which button you mean.

Basically you can configure it as any button you want.

But are you sure, that the button of the encoder can be pressed? When I build the knob by Jose the encoder was mechanically blocked by using the bearing.

Maybe you should check with a multimeter what happens, when you press the button. Is it connected to "GND" or to "+"?

The other/usual keys are connecting the signal to GND when pressed.

starletzzang commented 3 days ago

I missed one application I got a hint from your answer ""Basically you can configure it as any button you want."" I connected the encoder SW pin to the existing button and it worked like magic! And I think I forgot that you can configure multiple buttons and pins in config.h! Also I temporarily removed the bearing because of the click. Thank you

AndunHH commented 3 days ago

I'm glad it works for you.

Then I close this issue.