Debug terminal text on LCD display?
henriknc
Posts: 1
Hi all! I have a simple emitter/detector setup on the BoE and I have written the code so that the debug terminal displays every break in the the infrared led an photodiode and counts every time that happens. Now I would like to have the count displayed on the Parallex 2x16 Serial LCD display. Is there anyway to simple store the "debug" code into the LCD Display so when I use the sensor I dont need to have my laptop with me?
Another options is writing code for the serial display to react to what the sensor is doing, but I do not know of any "if" statements for the serial display! the examples provided are only pre-written text to store.
Any help is appreciated!
The sensor code is displayed below:
counter VAR Byte ' Trip Counter
' ---- [Main Code]
DEBUG "Program running, waiting for break in signal..." ' Initiates program
PAUSE 1000 ' Waiting for sensor to initiate
DEBUG CLS ' Starts counting
' ---- [Phototransistor initiation]
DO
DEBUG HOME, "IN15 - ", BIN IN15 ' Displays binary voltage signal
PAUSE 100
HIGH 0
IF IN15 = 0 THEN ' Motion Detected?
counter = counter + 1 ' Update Trip Counter
DEBUG HOME, "TRIPPED...", DEC3 counter
DO : LOOP UNTIL IN15 = 1 ' Wait For Object To Clear
DEBUG HOME, "CLEARED...", DEC3 counter
ENDIF
LOOP
' ---- [IR LED initiation]
DO
HIGH 0
LOOP
Another options is writing code for the serial display to react to what the sensor is doing, but I do not know of any "if" statements for the serial display! the examples provided are only pre-written text to store.
Any help is appreciated!
The sensor code is displayed below:
counter VAR Byte ' Trip Counter
' ---- [Main Code]
DEBUG "Program running, waiting for break in signal..." ' Initiates program
PAUSE 1000 ' Waiting for sensor to initiate
DEBUG CLS ' Starts counting
' ---- [Phototransistor initiation]
DO
DEBUG HOME, "IN15 - ", BIN IN15 ' Displays binary voltage signal
PAUSE 100
HIGH 0
IF IN15 = 0 THEN ' Motion Detected?
counter = counter + 1 ' Update Trip Counter
DEBUG HOME, "TRIPPED...", DEC3 counter
DO : LOOP UNTIL IN15 = 1 ' Wait For Object To Clear
DEBUG HOME, "CLEARED...", DEC3 counter
ENDIF
LOOP
' ---- [IR LED initiation]
DO
HIGH 0
LOOP
Comments
The product guide should tell you just about all you need.
Amanda