Drive a low-cost LCD character display directly from uLisp:
New application: LCD character display
Hi, i tried to run this example project using the same code (http://www.ulisp.com/show?2B6A). I copied the entire code and paste it on the entry line of the serial monitor, but nothing appeared on the lcd. the i typed “(go)”, nothing happened. I had to type “(ini)” and then everything worked just fine (every command worked as expected)
My question is: do i necessarily have to type “(ini)”?, or the code is designed to run as it is. This is just a naive question to learn some more how “defun” works because in the code there is a "(defun ini…) but in my tests i had to “called it” with “(ini)” first. I tried it on a ARDUINO NANO and on a ARDUINO MEGA with the same result, to get it working i had to type “(ini)” first.
Very instructive example,
Thanks in advance.
Paul,
Yes, you have to run (ini) first because it tells the LCD display
controller what mode to run in – 8 or 4 bit mode. The LCD controller
will come up in 8-bit mode by default but the circuit is wired for 4-bit
mode thus those few commands are needed (just once after power up)
for the LCD display to show text. OK?