Simple Numeric Keypad Newhaven Shield/Mega

Attached is a simple numeric keypad sketch. It's working with a Mega 2560 on a Newhaven NHD-4.3CTP-SHIELD-L using Arduino 1.8.13. You can search github for FTDI FT801 libraries and examples. I used the NewhavenDisplay repository examples posted by Pbartek. I think the FTDI examples are available in other places if you search.

It is adapted from KeyBoard.ino in the Intermediate folder. The added code is not very refined. I'm sure there are many better ways, but it is working. Hope it's helpful to someone. It limits entries to 3 digits. It clears out if you touch a 4th digit or touch clear. The integer partSuffix is currently just printed to the Serial Monitor if the enter key is touched after entering 3 digits.

Sorry, this image is larger than the actual 4.3" screen.

NumericKeyPad.ino (9 KB)