i'm having a hard time to figure out how to get a program that will
1 button press:
read text line
(check if has x in front line
read the next line)
print read line
hold button press:
write the read line to another text file
(next write will put the new to bottom of the oldest line)
put "x" in front of read line
overwrite x in front of read line
DKWatson:
Where are the text files? What code have you developed so far? Post what you've got and let's have a look.
the text files are in the SD,
this is the code for print
if (coins >= 10 && coins <19){
openFile("1h.txt"); //this is one of the text file
lcd.clear();
lcd.setCursor(0,0);
lcd.print("user and pass:");
lcd.setCursor(0,1);
lcd.print(readLine());
closeFile();
delay(8000);
lcd.clear();
coins = 0;}
this is the code for reading the line:
String readLine() {
String received = "";
char ch;
while (file.available()) {
ch = file.read();
if (ch == '\r') {
return String(received); }
else { received = received + ch; }
} return ""; }
It took you longer to apologize for posting crappy code than it would have taken to use Tools + Auto Format, and made it so that your code didn't look like crap.
bjdude18:
im very sorry paul, im in a hurry and there was some code in there that are in comments
and i just think that will not help, sorry again thanks.
In one of the passages of the "Don Quijote de la Mancha" romance, Don Quijote tells to his assistant: "VĂsteme despacio Sancho, que tengo prisa" (Dress me slowly, Sancho, for I am in a hurry).
Regards.
You haven't bothered fixing your piss-poor indentation, to make your code anywhere near readable. So, why should anyone here invest ANY effort in helping you?
PaulS:
You haven't bothered fixing your piss-poor indentation, to make your code anywhere near readable. So, why should anyone here invest ANY effort in helping you?
whats up with you? are you hurt? do you have a problem in your life or what?
i just wanted help, you commented and didn't liked my way of posting things
and i assumed that im not the only one who did that,
but i corrected it, i myself is only a beginner to this kind of stuff,
you eliminating the possibilities that someday i might grow a be good at this,
with this kind of community, it okay to correct things but be considerate somethimes
and respect others too.. hope you understand my point because English is not my first language
and yes im have no idea in programming and yes its my fault to not read the forum guideline and rules
sorry for that but i think you need to reprogram youself.. you kinda buggy..