LCD Commands not working - ERROR: LCD is not initialized!
Jwolf
Posts: 74
Hello, I decided to try out Blockly for the first time and am using the same Parallax 4x20 LCD (Back Light + sound) I've used on many other SPIN projects.
Using 'Communicate-> Serial LCD', I have put in 'serial lcd initialize' with the proper pin#, and It will display proper text and variables via 'serial lcd print'...
But I cannot get any 'Serial LCD Command' to work.
I have tried every Command available on the list, but when I compile and look at the code, it says " // ERROR: LCD is not initialized! "
http://blockly.parallax.com/blockly/projectlink?id=63490&key=965d7f4a-07a5-406f-bc4f-f3940c4f0f2d
Please help, I cannot clear screen or even do a carriage return!
Using 'Communicate-> Serial LCD', I have put in 'serial lcd initialize' with the proper pin#, and It will display proper text and variables via 'serial lcd print'...
But I cannot get any 'Serial LCD Command' to work.
I have tried every Command available on the list, but when I compile and look at the code, it says " // ERROR: LCD is not initialized! "
http://blockly.parallax.com/blockly/projectlink?id=63490&key=965d7f4a-07a5-406f-bc4f-f3940c4f0f2d
Please help, I cannot clear screen or even do a carriage return!
Comments
learn.parallax.com/tutorials/language/propeller-c/propeller-c-simple-protocols/half-duplex-serial:
there are several differences:
- The baud is not the same (but i suppose you configured correctly the switches.)
- an this is not present in your code.
Try the code at the learn site and search what is not working.
[Edit]
in blocky try to add the block :
send serial LCD command : display on, cursor on. (untested for me)
Instead of Blockly putting in code, it puts in "// ERROR: LCD is not initialized!"
Here's what that command block is sending:
["clear screen", "12"],
["move cursor right", "9"],
["move cursor left", "8"],
["move cursor down", "10"],
["carriage return", "13"],
["backlight on", "17"],
["backlight off", "18"],
["display off", "21"],
["display on, cursor off", "22"],
["display on, cursor off, blink", "23"],
["display on, cursor on", "24"],
["display on, cursor on, blink", "25"]
If you use the serial LCD print multiple block and configure it to just send characters, that will work until this gets fixed.