Fattoresaimon / i2cencoder

Documentation, source code and examples about the I2C Encoder project
GNU General Public License v3.0
41 stars 9 forks source link

Encoder button pushed? #2

Open MoonMoon82 opened 6 years ago

MoonMoon82 commented 6 years ago

Hi! I just started working with the i2c rotary encoder. The first question is: How can I determin if the pushbutton is (still) pressed and released?

Thx and kind regards

Fattoresaimon commented 6 years ago

Hi! I'm sorry but the push button is detectable only when is pushed. Is not possible to detect when is released or the current status.

MoonMoon82 commented 6 years ago

Thanks for your answer! I reviewed the schematic and connected a GPIO of my arduino to the pushbutton pin (see picture below). Now I can use readStatus(E_PUSH) as a filtered trigger from the FW and listen to the GPIO to get the state. It's a bit disappointing that there's no other way to recognise the state of the pushputton.

Kind regards 2018-07-20 10 59 53

Fattoresaimon commented 6 years ago

Hello, Nice job!

If you have a programmer for the PIC MCU you can modify the FW and add that feature, i can help for that. Actually before no one asked this feature, this is why i didn't implemented. Thanks for the suggestion

Simone

MoonMoon82 commented 6 years ago

Hi,

I would love to, but I have no experience in programming PICs in MPLAB X IDE. I‘m just happy to be able to program Arduinos and ESPs in plattform.io. And I have no experience in JTAG programmer, if this is what‘s needed.. I‘m sorry to be a noob -.-