Sonar data to parallel LCD display
reeltime
Posts: 2
Hello forum,
··· How do I go about getting the output from a sonar onto an parallel LCD display? Any help would be appreciated.
Thanks!
Joseph
··· How do I go about getting the output from a sonar onto an parallel LCD display? Any help would be appreciated.
Thanks!
Joseph
Comments
·
·· Which Sonar?· How are you trying to display the data?· Raw, Feet, Inches, CM?· How is the LCD connected?· Which BASIC Stamp Model are you using?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thanks for replying. I am using a Devantech SRF-04 ranger with a Basic Stamp II. My LCD is connected for 4 bit mode. I am hoping to display my data in inches and cm. Sorry for not including this data before!
Regards,
Joe
·
·· There are already several example codes dealing with the SRF-04 for the BS2.· All of the ones I’ve seen deal with the DEBUG screen or the SEETRON Serial LCD Displays.· All you need to do is see how the variable is being presented on the display and for each character you will need to grab that digit (using DIG) and add $30 to the value before sending it out to the display.
·
So if a variable called, temp contains 123, you could display that by doing something like:
·
lcdOut = temp DIG 2
GOSUB Write_LCD
lcdOut = temp DIG 1
GOSUB Write_LCD
lcdOut = temp DIG 0
GOSUB Write_LCD
·
I know I have some Parallel LCD example code somewhere for doing this by example.· I will try to find it, but in the meantime the above should give you the concepts required.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support