im using Arduino 0022 version
because that one is supportable for the TFT Screen Im using. ( ILI9320)
when im moving with it , i worked in serial reading
the function readBytesUntil
there is an error comes and it says
"class HardwareSerial has no member named readBytesUntil "
now what can i do ???
really sad it is.
void testtext12(uint16_t color) // ACK ^
{
if(e5<1)
{
Serial.print("^"); // ^ sign to ACK pc to send info
e5++;
}
delay(200);
if (Serial.available() > 0)
{
[color=blue] int bytesRead = Serial.readBytesUntil('*', credit, 4); [/color]
}
tft.setCursor(50, 40);
tft.setTextColor(BLUE);
tft.setTextSize(4);
tft.print( credit[0]);
tft.print(credit[1]);
tft.print( credit[2]);
tft.print(credit[3]);
}
Arduino: 1.5.3 (Windows 7), Board: "Arduino Mega 2560 or Mega ADK"
In file included from sketch_sep04a.ino:17:
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:65: error: expected class-name before '{' token
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:67: error: expected `)' before 'cs'
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:69: error: 'uint16_t' does not name a type
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:74: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:74: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:74: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:75: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:76: error: 'int16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:76: error: 'int16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:76: error: 'int16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:76: error: 'int16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:76: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:77: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:77: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:77: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:77: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:77: error: 'uint8_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:78: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:78: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:78: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:78: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:79: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:79: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:79: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:79: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:80: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:80: error: 'uint16_t' has not been declared
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:81: error: 'uint16_t' has not been declared
sketch_sep04a:39: error: no matching function for call to 'TFTLCD::TFTLCD(const uint8_t&, const uint8_t&, const uint8_t&, const uint8_t&, const uint8_t&)'
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:65: note: candidates are: TFTLCD::TFTLCD()
C:\Users\Dell\Desktop\0022\arduino-1.5.3\libraries\TFTLCD/TFTLCD.h:65: note: TFTLCD::TFTLCD(const TFTLCD&)
sketch_sep04a.ino: In function 'void testtext(uint16_t)':
sketch_sep04a:266: error: 'class TFTLCD' has no member named 'println'
sketch_sep04a:269: error: 'class TFTLCD' has no member named 'println'
sketch_sep04a:273: error: 'class TFTLCD' has no member named 'print'
sketch_sep04a.ino: In function 'void testtext5(uint16_t)':
sketch_sep04a:288: error: 'class TFTLCD' has no member named 'println'
sketch_sep04a:291: error: 'class TFTLCD' has no member named 'println'
sketch_sep04a:294: error: 'class TFTLCD' has no member named 'print'
sketch_sep04a:295: error: 'class TFTLCD' has no member named 'print'
sketch_sep04a:296: error: 'class TFTLCD' has no member named 'print'
sketch_sep04a:297: error: 'class TFTLCD' has no member named 'print'
sketch_sep04a.ino: In function 'void testtext2(uint16_t)':
sketch_sep04a:309: error: 'class TFTLCD' has no member named 'width'
sketch_sep04a:309: error: 'class TFTLCD' has no member named 'height'
sketch_sep04a:310: error: 'class TFTLCD' has no member named 'print'
sketch_sep04a:312: error: 'class TFTLCD' has no member named 'print'
sketch_sep04a:315: error: 'class TFTLCD' has no member named 'width'
sketch_sep04a:315: error: 'class TFTLCD' has no member named 'height'
sketch_sep04a:316: error: 'class TFTLCD' has no member named 'print'
sketch_sep04a:318: error: 'class TFTLCD' has no member named 'print'
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Not going there. The Arduino forum provides a non-virus-infected way to share code. Look at the Additional Options link when typing a response. Add the file as an attachment.
Anyway, the issue looks like TFTLCD.h hasn't been updated for 1.0+ use.
How can you do what? I'll assume that the link to dropbox has some relationship to the question. There is, however, no reason to be using some potentially virus-infected site to host things that the forum can host for you, and that we can then all open.
Change "Wprogram.h" to "Arduino.h"
Make sure "TFTLCD::write" has the correct return type and returns 1.
(Don't forget to correct the prototype in the ".h", and the method itself in the ".cpp")
I think that's about it - it compiles for me, but I can't test it.