Shop OBEX P1 Docs P2 Docs Learn Events
Sonar data to parallel LCD display — Parallax Forums

Sonar data to parallel LCD display

reeltimereeltime Posts: 2
edited 2006-10-12 02:30 in BASIC Stamp
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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-10 20:52
    Joseph,
    ·
    ·· 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
  • reeltimereeltime Posts: 2
    edited 2006-10-11 23:34
    Chris,

    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
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-12 02:30
    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
Sign In or Register to comment.