Shop OBEX P1 Docs P2 Docs Learn Events
I am stuck and need help on a program — Parallax Forums

I am stuck and need help on a program

SuffernEDDSuffernEDD Posts: 10
edited 2009-05-07 15:43 in BASIC Stamp
I am using the parallax gps in order to be able to project that speed onto a windshield of my car using 2- seven segment LED's (one led for each digit). I have the code written for the gps to get the information that i am going to use, which is speed. I need to be able to take that speed measurement and:
······ -get it as a decimal number in the program (make it as a variable???)
·······-seperate the two digits (assuming that the speed will always be a two digit number)
······ -light up specific led's on the seven segment (this part shouldnt be too hard b/c i have done this before)


·*** I really only need help getting the speed reading as a variable and splitting it into two digits. I am totally stumped by this and it would help if anybody has ever done this before.

Thanks

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-05-07 15:43
    Separating something into two digits really depends on how the data is stored initially. Often what is needed though is the DIG operator. If you look this up in the Help File or Manual it might give you the information you need to proceed. Essentially it lets you extract digits out of a variable. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.