Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Grand Central and 2.8 TFT LCD with Touchscreen
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Grand Central and 2.8 TFT LCD with Touchscreen

by gradybooch on Tue Apr 07, 2020 6:45 am

Has anyone been successful in mating the Grand Central with this shield? Display works just fine, but when I try code that builds on the capacitive touchscreen APIs, I get this note

.../Documents/Arduino/libraries/Adafruit_TFTLCD_Library/pin_magic.h:467:2: error: #error "Board type unsupported / not recognized"
#error "Board type unsupported / not recognized"

I've poured through the tutorials, as well as the code itself, but no joy.

Thanks!

gradybooch
 
Posts: 13
Joined: Sun Sep 16, 2018 9:04 pm

Re: Grand Central and 2.8 TFT LCD with Touchscreen

by dastels on Tue Apr 07, 2020 2:30 pm

The problem is that the library (specifically this header file) doesn't have support for the SAMD21/51 MCUs used on the later Metro boards.

Code: Select all | TOGGLE FULL SIZE
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) ||               \
    defined(__AVR_ATmega328__) || defined(__AVR_ATmega8__)

...

#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) ||            \
    defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)

...

#elif defined(__AVR_ATmega32U4__)

...

#elif defined(__SAM3X8E__)

...

#else

#error "Board type unsupported / not recognized"

#endif


It whould be *just* the matter of adding sections for those MCUs (the SAMD51 in this case). Unfortunately I don't see any issues or pull requests relating to this. I don't have one of these displays and it's out of stock even if I could order one to tinker with.

If you don't want to delve that deeply, you might try contacting one of the main contributors to see if they're interested in bringing it up to date.

Dave

dastels
 
Posts: 3549
Joined: Tue Oct 20, 2015 3:22 pm

Re: Grand Central and 2.8 TFT LCD with Touchscreen

by gradybooch on Tue Apr 07, 2020 3:13 pm

ahhhhh..that looks easy enough to patch!

I'll give it a go. Thanks!

gradybooch
 
Posts: 13
Joined: Sun Sep 16, 2018 9:04 pm

Re: Grand Central and 2.8 TFT LCD with Touchscreen

by dastels on Tue Apr 07, 2020 5:00 pm

My pleasure.

Dave

dastels
 
Posts: 3549
Joined: Tue Oct 20, 2015 3:22 pm

Re: Grand Central and 2.8 TFT LCD with Touchscreen

by gradybooch on Wed Apr 08, 2020 4:48 pm

Am getting there...

I see where I can make the patch, but now the trick is to find the proper board type for the Grand Central (of the form __AVR_ATmega1281__)...my guess is that it would be something like __SAMD_mumblemumble__), so I'll go lurking in the source to see if I can stumble upon it.

gradybooch
 
Posts: 13
Joined: Sun Sep 16, 2018 9:04 pm

Re: Grand Central and 2.8 TFT LCD with Touchscreen

by dastels on Wed Apr 08, 2020 8:21 pm

Looks like the relevant definitions are:

Code: Select all | TOGGLE FULL SIZE
__SAMD51P20A__
ADAFRUIT_GRAND_CENTRAL_M4
__SAMD51__


Dave

dastels
 
Posts: 3549
Joined: Tue Oct 20, 2015 3:22 pm

Re: Grand Central and 2.8 TFT LCD with Touchscreen

by gradybooch on Fri Apr 10, 2020 8:21 am

fantastic! thanks

I've now been successful in getting the touchscreen to work

gradybooch
 
Posts: 13
Joined: Sun Sep 16, 2018 9:04 pm

Re: Grand Central and 2.8 TFT LCD with Touchscreen

by dastels on Fri Apr 10, 2020 9:05 am

Excellent! Care do a pull request?

Dave

dastels
 
Posts: 3549
Joined: Tue Oct 20, 2015 3:22 pm

Re: Grand Central and 2.8 TFT LCD with Touchscreen

by RCohenQubiq on Sat Aug 01, 2020 2:14 pm

Hello gradybooch,

Could you please do a pull request on GitHub with your changes for the Grand Central M4, or post them?

https://github.com/adafruit/TFTLCD-Library

Thanks very much.

RCohenQubiq
 
Posts: 11
Joined: Wed Jul 15, 2020 1:38 pm

Please be positive and constructive with your questions and comments.