Adafruit_ILI9341
Adafruit_ILI9341 copied to clipboard
Compilation error: expected '}' at end of input
Hi, I'm having a trouble with the library, when I uploaded to my Arduino Uno, the console warned an copilation issue with my code, the warning was "Compilation error: expected '}' at end of input", but the code don't have an issue with the '}', i tryed too much and i can't fix it, the copilation error code was
**C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved202443-45348-n0tyc9.qkbt\sketch_may3a\sketch_may3a.ino:32:1: error: expected '}' at end of input } ^ In file included from C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved202443-45348-n0tyc9.qkbt\sketch_may3a\sketch_may3a.ino:1:0: c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h: In member function 'void TFT_ILI9163C::drawArc(uint16_t, uint16_t, uint16_t, uint16_t, float, float, uint16_t)': c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:204:7: error: 'drawArcHelper' was not declared in this scope drawArcHelper(cx, cy, radius, thickness, 0, _arcAngleMax, color); ^~~~~~~~~~~~~ c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:204:7: note: suggested alternative: 'drawCircle' drawArcHelper(cx, cy, radius, thickness, 0, _arcAngleMax, color); ^~~~~~~~~~~~~ drawCircle c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:206:7: error: 'drawArcHelper' was not declared in this scope drawArcHelper(cx, cy, radius, thickness, start + (_arcAngleOffset / (float)360)_arcAngleMax, end + (_arcAngleOffset / (float)360)_arcAngleMax, color); ^~~~~~~~~~~~~ c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:206:7: note: suggested alternative: 'drawCircle' drawArcHelper(cx, cy, radius, thickness, start + (_arcAngleOffset / (float)360)_arcAngleMax, end + (_arcAngleOffset / (float)360)_arcAngleMax, color); ^~~~~~~~~~~~~ drawCircle c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h: In member function 'virtual size_t TFT_ILI9163C::write(uint8_t)': c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:233:37: error: '_textWrite' was not declared in this scope virtual size_t write(uint8_t b) { _textWrite((const char *)&b, 1); return 1;} ^~~~~~~~~~ c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:233:37: note: suggested alternative: '_textWrap' virtual size_t write(uint8_t b) { _textWrite((const char )&b, 1); return 1;} ^~~~~~~~~~ _textWrap c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h: In member function 'virtual size_t TFT_ILI9163C::write(const uint8_t, size_t)': c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:234:61: error: '_textWrite' was not declared in this scope virtual size_t write(const uint8_t *buffer, size_t size) {_textWrite((const char *)buffer, size); return size;} ^~~~~~~~~~ c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:234:61: note: suggested alternative: '_textWrap' virtual size_t write(const uint8_t *buffer, size_t size) {_textWrite((const char *)buffer, size); return size;} ^~~~~~~~~~ _textWrap c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h: In member function 'void TFT_ILI9163C::enableCommandStream()': c:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C/TFT_ILI9163C.h:357:34: error: a function-definition is not allowed here before '{' token attribute((always_inline)) { *rsport |= dcpinmask;//hi } ^ C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved202443-45348-n0tyc9.qkbt\sketch_may3a\sketch_may3a.ino:32:1: error: expected '}' at end of input } ^ C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved202443-45348-n0tyc9.qkbt\sketch_may3a\sketch_may3a.ino: At global scope: C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved202443-45348-n0tyc9.qkbt\sketch_may3a\sketch_may3a.ino:32:1: error: expected unqualified-id at end of input Multiple libraries were found for "TFT_ILI9163C.h" Used: C:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C Not used: C:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C-1.0 Not used: C:\Users\User\Documents\Arduino\libraries\TFT_ILI9163C-master exit status 1
Compilation error: expected '}' at end of input**
I tryed uploading the BigTest demo but this issue still unfixed.
this is my code that I used
**#include <TFT_ILI9163C.h>
#include <SPI.h> #include <TFT_ILI9163C.h>
#define TFT_CS 10 #define TFT_RST 9 #define TFT_DC 8
TFT_ILI9163C tft = TFT_ILI9163C(TFT_CS, TFT_DC, TFT_RST);
void setup() { tft.begin();
tft.setTextColor(ILI9163C_WHITE); tft.fillScreen(ILI9163C_BLACK);
tft.setTextSize(2);
tft.setCursor(10, tft.height() / 2 - 10); tft.print("Hello, World!"); }
void loop() {
} ** sorry for my bad english :)