LCD and encoder modules - button events

Hi,
I have encountered one “not very bright” design decission on LCD module making trouble using it together with encoder module.

Encoder has it’s button connected to BOOT signal in standard way. On LCD module, 2 buttons below display are connected to I2C expander (so far so good). But for some reason, there are double diode (D1) connecting both buttons to BOOT signal as well, resulting in each of display buttons generating 2 events, second event acting as encoder button push. That makes it quite difficult to distinguish between LCD and encoder buttons.

What is preferred way of solving this problem? I can think of 2 solutions:

  1. solder out D1 from LCD module. But that would void warranty and it is not very easy with my simple equipment.

  2. on button events just set some flags which button triggered event and fire scheduller task for ~10ms later. In this schedulled task I would analyze which button flags were triggered and in case LCD module was pressed, i would ignore encoder button.

And if I can have suggestion, leave out D1 on LCD module at all, probability that someone would need to use LCD module as push button is rather low and it can even be easily done in push button firmware.

Thanks for suggestions,
Mixi

Hi, we have some code solution to that. We’ll give you an update in a few days.