Shop OBEX P1 Docs P2 Docs Learn Events
Using Pointing-Point Coprocessor on BS2/Ping=))/Lcd Display — Parallax Forums

Using Pointing-Point Coprocessor on BS2/Ping=))/Lcd Display

irivineirivine Posts: 18
edited 2008-11-17 01:43 in BASIC Stamp
I have bought the following product from the start

1)BS2
2)Ultrasonic sensor
3)2x16 Lcd display
4)Floating-Point Coprocessor

i have manage to get the program running in the way i would like it to be but i could not figure out how do i display the "speed" in my attach project code in decimal place.it seem that the stamp does not support the decimal point feature hence i bought the coprocessor.

i have attached the code of my program and hope i could get any help from someone

Thanks you
any help render will be appreciated smile.gif

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-11-16 18:15
    If you want two decimal places you need to multiply your answer by 100 before you send it to the stamp then print the number devided by 100, a period and the the number mod 100. At least I think that's it, I have to relearn these things every time I use them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • MSDTechMSDTech Posts: 342
    edited 2008-11-16 20:19
    Which floating point processor are you using? The ones I have used will produce a string internally containing a formated number. You can copy that string, one byte at a time, to the LCD for display. I didn't notice any code in the sample you provided that uses the floating point co-processor.
  • $WMc%$WMc% Posts: 1,884
    edited 2008-11-16 23:13
    irivine

    I Think You have "mistakinly" Attched the wrong file to Your Post????,,,,....No biggy, Just use the "pencil" icon gemick!"upper right"

    _______$WMc%________________easyfixes
  • irivineirivine Posts: 18
    edited 2008-11-17 00:50
    yeah ... it the right code

    the code is up to the point where i have manage to get my project done with the ping))),stamp and lcd

    i have no idea how am i going to use them together with the floating point coprocessor

    the floating point processor i am using is :
    http://www.parallax.com/Store/Sensors/CustomKits/tabid/134/txtSearch/processor/List/1/ProductID/244/Default.aspx?SortField=ProductName,ProductName
  • FranklinFranklin Posts: 4,747
    edited 2008-11-17 01:43
    Have you run any of the programs with the FPu? There is code on the page where you bought the part.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.