Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: wbbb1 on May 19, 2016, 08:20 pm

Title: 'HX8357B' (3.2 TFT Monitor) was not declared in this scope
Post by: wbbb1 on May 19, 2016, 08:20 pm
I bought a 3.2 TFT LCD Monitor off Ebay, when I run the code provided, I get the message 'HX8357B' was not declared in this scope. When I looked inside of UTFT.h file the HX8357B is not listed. When I change the it to HX8347A it get 'Error complining for board Arduino Mega or Mega 2560, the board I am using.

Here is the code (As coped)

#if defined(__AVR__)
   #define imagedatatype  unsigned int
#elif defined(__PIC32MX__)
   #define imagedatatype  unsigned short
#elif defined(__arm__)
   #define imagedatatype  unsigned short
#endif
// End of multi-architecture block

#include <UTFT.h>
#include <UTouch.h>
#include <UTFT_Buttons.h>

// Declare which fonts we will be using
extern uint8_t BigFont[];

// Declare which bitmaps we will be using
extern imagedatatype cat[];
extern imagedatatype dog[];
extern imagedatatype bird[];
extern imagedatatype monkey[];

// Set up UTFT...
// Standard Arduino Mega/Due shield            : <display model>,38,39,40,41

// Remember to change the model parameter to suit your display module!
UTFT   myGLCD(HX8347A,38,39,40,41);

// Set up UTouch...
// Standard Arduino Mega/Due shield            : 6,5,4,3,2

UTouch  myTouch(52, 48, 51,50, 49);
Title: Re: 'HX8357B' (3.2 TFT Monitor) was not declared in this scope
Post by: spycatcher2k on May 19, 2016, 09:10 pm
OK - a link to the ebay page would be the MINIMUM I would expect for someone asking about it, Posting the whole code correctly would be expected, not just a random part of it, posted incorrectly.

Resolve these and I'll gladly take a look.
Title: Re: 'HX8357B' (3.2 TFT Monitor) was not declared in this scope
Post by: pert on May 19, 2016, 09:34 pm
I get the message 'HX8357B' was not declared in this scope. When I looked inside of UTFT.h file the HX8357B is not listed.
That's why it's not declared, there's nothing that can be done about that error other than modifying the library to support HX8357B or finding a library that already supports it but worth a try with the HX8347A setting:

When I change the it to HX8347A it get 'Error complining for board Arduino Mega or Mega 2560, the board I am using.
You need to post the full error output that's in the black console window if you want any help with that(and the full sketch as spycatcher2k requested). There is a button Copy Error Message shown on the right side of the orange bar after you get the error. Click that button and then paste it in a message here using code tags(</> button on the toolbar).