Shop OBEX P1 Docs P2 Docs Learn Events
RaceCar timer Problem — Parallax Forums

RaceCar timer Problem

Dr. VetterDr. Vetter Posts: 34
edited 2009-03-15 19:18 in BASIC Stamp
Hello all,

I am doing a project for a derby which has four lanes and the circuit will detect the car and give it a place in the race·then display it.
I am just playing around with the detection portion of the code and I can not get it to detect one lane.
The way I have wrote the code it should stay in the main loop and wait for one of the lanes to detect the car.
Then its suppose to go into a subroutine that gives its position and then to display (which right now I'm using the debug).
Now·the problem with my code is that if ANY input goes low then all lanes are displaying the same Rank without them even being triggered.
I thought that by creating an integer with the names PlaceXX = Rank for each lane would separate them but it still only displays all the lanes

any Input would be Greatly appreciated

Also I keep going back to the Parallax Tutorial on Keypads.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-03-15 19:18
    DEBUG "LANE 1 =",? RANK           
    

    Since all your places display the variable "rank" they will all be the same. You need to display place1 for lane1 and place2 for lane2 and so on.

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