Displaying 3x4 Keypad Inputs on 7" TFT LCD

Hello!

I am trying to interface an Adafruit Keypad and an Adafruit 7" TFT LCD. I'd like to be able to print the numbers selected on the keypad in order on the screen but they are currently overlapping on each other if I hit several in a row. I'm using the Adafruit RA8875 driver for the display.

Additionally, if I anyone knows how I can easily convert the char to int, I would really appreciate it.

Attached is my code (it comes from the Adafruit "textmode" example, but I've made changes).

Any and all help is appreciated. Also please be nice, I'm still new at this.

textmode.ino (2.65 KB)

To convert any char type variable from a keyboard that generates a char string or from a virtual keyboard in the TFT into integers, you can use these options:

variable int = atol(variable char)
variable float = atof(variable char)

The best example you can follow is the one that comes in the URTouch library, specifically: URTouch_ButtonTest.ino

Just adapt it to your project, it is very easy to follow.

This topic was automatically closed after 55 days. New replies are no longer allowed.