Skip to content

Buttons

Rows

The same rows as connected together for the display also share inputs for the buttons.

ESPRows
GPIO391 & 7
GPIO362 & 8
GPIO353 & 9
GPIO344 & 10
GPIO335 & 11
GPIO326 & 12

Detecting Button Presses

  1. Detect button presses by checking for high values on the input pins. This indicates whether one or more buttons are being pressed in that row group.
  2. Once you have a row group, cycle through each pixel in the row. Use the same logic & data format as the display to set this pixel to red. However, instead of drawing to the display as normal, instead send the data after setting A0, A1 & A2 low. For reference, send [0xFF] * 9 and set the relevant red component to 0 as you scan.
  3. Read the same row group input pin again. If the current pixel is pressed, the value should now be low.
  4. Continue 2 and 3 until a button has been found.
  5. You may wish to redraw to the display as normal after this to reduce artifacts shown.