Go Down

Topic: serial monitor print ok - lcd.print malfunctioning (Read 574 times) previous topic - next topic

Matteo_Zane

Dear all,
I'm Matteo, I had experience of programming with fortran and Matlab during Univeristy (15 years ago).
I knew Arduino some months ago and after done some trial I decided to try to build an alarm system for my house so I wrote this code (in a very rudimental way, sorry for my limit).
I used:

1 Arduino Mega 2560
1 rele module to manage a siren (plus 1 spare for future implementation)
1 lcd 16x2
3 pir sensors
1 keypad 4x3


The code runs in a good way managed by the serial monitor (pc window) but if managed by the lcd, after the verifying of the alarm password, the lcd gives unusual characters (as "?", "w") permanently.
Typing the password the program runs even if LCD is malfunctioning (obviously). I thought it could be the rele presence but, disconnected the rele from the circuit, I noticed the same problem...it seems that the " for cycle" regarding the recognising of the password causes some problem to the lcd.print statement.
I attach here the code.
Does anywone have some suggestion?
Thnks and Best regards,
Matteo

AWOL

That's a lot of code; I was expecting to see a much shorter sketch just to test the LCD.
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

ghlawrence2000

UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

AWOL

And foreign :smiley-eek:
I don't think it takes a polyglot to figure out what "stato_allarme" and "codicecorretto" means.
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

CarlW

Looks like it would be auto scrolling to the next line. Possible end result would be left over characters.

And re printing the screen every cycle.

Matteo,
Is your serial window scrolling text rapidly when this code functions as desired?

Can you post a video of your set up?

Are you having issues printing lines that are longer than 16 characters on your display?




Go Up