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

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




PostPosted: Thu Jan 22, 2004 9:35 pm   Post subject: LED : Help

hi,
can someone help me by writing a program where i can just put in the parallelput (x) and delay (x) and it will work?
i m not that good with writing programs. And i have an exam where i have to light the LEDS to represent a car in motion. like
LED 1-represents when the car goes forword
LED 2-represents when the car goes backword
LED 3-represents when the car wheels turn right
LED 4-represents when the car wheels turn left.

say for example i have to make a rectange, what kind of program should i use?

thx.
cii
Sponsor
Sponsor
Sponsor
sponsor
DanShadow




PostPosted: Thu Jan 22, 2004 10:34 pm   Post subject: (No subject)

Shocked....do you call yourself a programmer??? lol
Well...
code:

Draw.FillBox(100,100,200,200,255)
%OR
Draw.Box(100,100,200,200,255)

would work for boxes...but seeing as your rotating (im guessing)...use MSPaint....draw a car, use "Pic.Draw" command, and then use "Pic.Rotate" to rotate the car. Then when you move forward or backward, it moves the cars (x,y) co-ordinates accordingly depending on the angle or rotation. Smile
AsianSensation




PostPosted: Thu Jan 22, 2004 10:40 pm   Post subject: (No subject)

DanShadow wrote:
Shocked....do you call yourself a programmer??? lol
Well...
code:

Draw.FillBox(100,100,200,200,255)
%OR
Draw.Box(100,100,200,200,255)

would work for boxes...but seeing as your rotating (im guessing)...use MSPaint....draw a car, use "Pic.Draw" command, and then use "Pic.Rotate" to rotate the car. Then when you move forward or backward, it moves the cars (x,y) co-ordinates accordingly depending on the angle or rotation. Smile


I think parallelput, DanShadow (I mean Hacker Dan's alternate persona that knows how to spell) doesn't involve the turing draw module that outputs to screen. I never used parallelput, the closest I got to program -> flashing light is the Lego mindstorm thing that I had to use in robotics. But I would imagine that the draw module doesn't work for parallelput .
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: