View Single Post
  #3   Spotlight this post!  
Unread 07-02-2004, 00:55
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: IR reflective (tape) sensor code problems

where are you declaring "counter" and "endprogram"? if they are outside a function, you probably need to initialize them somewhere else (i.e. don't put the =0 part in, instead assign them the value of 0 in User_Initialization or somewhere there).

if they are in the function, add "static" in front of "int", so that it reads "static int counter" and "static short endprogram" - you don't want the values reset every time the function is called.

it does seem that the counter is working at least somewhat decently, though, as it is waiting for 15 seconds... could you post the code that comes after the IR part?
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)