Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Set The Toggle Press Time plus Diode Question #30

Open
speedbird5 opened this issue Jan 22, 2021 · 17 comments
Open

Cannot Set The Toggle Press Time plus Diode Question #30

speedbird5 opened this issue Jan 22, 2021 · 17 comments

Comments

@speedbird5
Copy link

speedbird5 commented Jan 22, 2021

Hi,

First a question on wiring. Do I really need to use diodes in my wiring for a button matrix as shown in the FreeJoy Wiki here: https://github.com/FreeJoy-Team/FreeJoyWiki/blob/master/eng/Connecting-buttons-directly-to-controller.md

Also, why are the diode directions different in the button matrix for only buttons, but are in the reverse direction when you include an encoder as shown here: https://github.com/FreeJoy-Team/FreeJoyWiki/blob/master/eng/Encoders-connection.md

You say in the FreeJoy Wiki here:
https://github.com/FreeJoy-Team/FreeJoyWiki/blob/master/eng/Buttons-configuration.md

"...(the time while the logical button remains pressed is set in the Toggle Press Time field of the Advanced Settings section)..."

But in the Advanced settings section there is no way to set the Toggle Press Time.

I am using version 1.6.2b3

Thanks.

Capture

@speedbird5 speedbird5 changed the title Setting Cannot Set The Toggle Press Time Jan 22, 2021
@speedbird5 speedbird5 changed the title Cannot Set The Toggle Press Time Cannot Set The Toggle Press Time and Diodes ? Jan 22, 2021
@speedbird5 speedbird5 changed the title Cannot Set The Toggle Press Time and Diodes ? Cannot Set The Toggle Press Time and Diodes Jan 22, 2021
@speedbird5 speedbird5 changed the title Cannot Set The Toggle Press Time and Diodes Cannot Set The Toggle Press Time plus Diode Question Jan 22, 2021
@vostrenkov
Copy link
Member

vostrenkov commented Jan 22, 2021

Hi!

Do I really need to use diodes

You need them if you suppose some of your buttons can be pressed simultaneously. You will get ghost pressing without diodes

why are the diode directions different in the button matrix for only buttons, but are in the reverse direction when you include an encoder

If you look closer you will see that both diagrams have cathode to the row pin and anode to the column pin

But in the Advanced settings section there is no way to set the Toggle Press Time

Wiki is a bit outdated. This settings now available as "Press timer" on Buttons tab. It works now not only for toggle switches but also for other button types

@speedbird5
Copy link
Author

Thanks for the explanations. I will be using quite a few toggle switches that could have two or more latched on at the same time so diodes will be needed.

Thank you for your work on this project.

@speedbird5
Copy link
Author

Another question. If I want a logical button to be pressed for as long as I hold the physical button down, how do I do that ?

thanks.

@vostrenkov
Copy link
Member

vostrenkov commented Jan 22, 2021

You do "button_nornal" and no timers applied

@speedbird5
Copy link
Author

speedbird5 commented Jan 22, 2021 via email

@speedbird5
Copy link
Author

speedbird5 commented Jan 24, 2021

Forgive me as I am a noob with more dumb questions:

  1. Why do you have two options for wiring switches directly as VCC or GND ? Wouldn't you normally just use the GND option and use the Configurator to flip the output ?
  2. Is there a way to wire a 4 position rotary switch using the Configurator ?
    105621439-0db20880-5e53-11eb-85a2-b7c2e6131cdc

@vostrenkov
Copy link
Member

vostrenkov commented Jan 24, 2021

  1. It is supposed that some people may use freejoy to replace controller on their device. So if you already have your wiring done with external pull-up or pull-down you may choose required option
  2. Yes, there are several ways to do this:
  • just connect 4 button pins directly to switch contacts and rotary's common gnd/vcc to board gnd/vcc
  • make a hardware mode to connect it to analog input and use axis2buttons function

More information can be found here

@speedbird5
Copy link
Author

speedbird5 commented Jan 24, 2021 via email

@vostrenkov
Copy link
Member

I'd recommend to wire buttons with common GND

@speedbird5
Copy link
Author

speedbird5 commented Jan 24, 2021 via email

@speedbird5
Copy link
Author

speedbird5 commented Jan 24, 2021 via email

@vostrenkov
Copy link
Member

Hi, it is possible.
You just need to flash arduino bootloader to stm32

@speedbird5
Copy link
Author

speedbird5 commented Jan 25, 2021 via email

@vostrenkov
Copy link
Member

It will for sure

@speedbird5
Copy link
Author

speedbird5 commented Jan 25, 2021 via email

@vostrenkov
Copy link
Member

I don't know how exactly arduino bootloader works and where it placed in device memory. But freejoy also have its own bootloader in stm32's flash and I'm sure it will be overwritten by arduino bootloader or arduino sketch

@speedbird5
Copy link
Author

Ok thanks for clarifying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants