Parallax Serial LCD Driver v1.2
xanadu
Posts: 3,347
I have a question about this object. I'm trying to use it and I was wondering what this does -
Am I supposed to modify pin, baud and lines to the settings I use, or is that somewhere else?
Thanks!
PUB init(pin, baud, lines): okay
'' Qualifies pin, baud, and lines input
'' -- makes tx pin an output and sets up other values if valid
started~ ' clear started flag
if lookdown(pin : 0..27) ' qualify tx pin
if lookdown(baud : 2400, 9600, 19200) ' qualify baud rate setting
if lookdown(lines : 2, 4) ' qualify lcd size (lines)
if serial.init(-1, pin, baud) ' tx pin only, true mode
lcdLines := lines ' save lines size
started~~ ' mark started flag true
return started
Am I supposed to modify pin, baud and lines to the settings I use, or is that somewhere else?
Thanks!

Comments
What you see in that code are only the valid values.
obj serial_lcd : "serial_lcd" pub main serial_lcd.init(23,19200,2)Thanks