Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 LED's IN SEQUENCE : ASAP PLEASE
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cii009




PostPosted: Tue Jan 20, 2004 7:01 pm   Post subject: LED's IN SEQUENCE : ASAP PLEASE

is there anything rong with this program?


***i m trying to light LED's in Sequence so that it is like a car being driven.
Um, I have 4 LEDS.

**When the lights are lit, the car moves in that direction**
parallelput (1 ) ---->Forward
parallelput (2 ) ---->backward
parallelput (4 ) ---->Left side
parallelput (8 ) ---->Rightside

now what i have to do is make it so that the car is going or making a rectangle. So this is the program I created:
loop
parallelput (1)
delay (12)
parallelput (5)
delay (5)
parallelput (1)
delay (12)
parallelput (5)
delay (5)
parallelput (1)
delay (12)
parallelput (5)
delay (5)
parallelput (1)
delay (12)
end loop

is there anything wrong with it?
Please help me ASAP!
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Tue Jan 20, 2004 8:37 pm   Post subject: (No subject)

sory but it is kind of hard to test wiht out aucaly being there with your crickit for the LEDs.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
McKenzie




PostPosted: Tue Jan 20, 2004 10:40 pm   Post subject: (No subject)

If the lights actually flicker, try increasing the delay. 12 milliseconds is not much (I'd try 1000, more for a real car)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: