LED : Help
Author |
Message |
cii009
|
Posted: 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
|
|
|
DanShadow
|
Posted: Thu Jan 22, 2004 10:34 pm Post subject: (No subject) |
|
|
....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. |
|
|
|
|
|
AsianSensation
|
Posted: Thu Jan 22, 2004 10:40 pm Post subject: (No subject) |
|
|
DanShadow wrote: ....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.
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 . |
|
|
|
|
|
|
|