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

Username:   Password: 
 RegisterRegister   
 turing and engineering assignment
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
brianrood




PostPosted: Mon Jan 10, 2005 10:20 am   Post subject: turing and engineering assignment

Hey, I have to do a final ISU for my computer engineering class, and I have to use turing and then using the parallel port and a breadboard I have to create something like working stop lights or a joystick or something of that sort, and I was wondering if anyone had any cool Ideas I could whip up quick or if n e 1 could direct me to a website with a bunch of ideas for projects, you can e-mail me , or reply here and I will check it.
Thanks,
brianrood
Sponsor
Sponsor
Sponsor
sponsor
TheZsterBunny




PostPosted: Mon Jan 10, 2005 8:32 pm   Post subject: (No subject)

Hrm. you could have a sort of 'bar meter' monitoring something

i haven't taken compeng, but maybe you could have a motor spinning, lights static around it, and the speed of the motor reflected by number of lights.

simpleish to do in turing (save the motor part -- no ideas), but the lights would look good there.


or you could speak to a tech teacher, dig up an old cannon project, and turn it into a 'fusion pulse laser cannon' by adding some leds to simulate charging and firing of the weapon. that could either be really cool or really cheezy.

good luck!

--edit--
heck, if you felt like it, you could do a binary clock. that'd be very cool.

-Z
scottyrush13




PostPosted: Mon Jan 10, 2005 10:20 pm   Post subject: (No subject)

a binary clock eh Thinking ? thats not a half bad idea

you should do it lol

sounds pretty neat
brianrood




PostPosted: Mon Jan 10, 2005 11:54 pm   Post subject: lateda, binary clock eh?

How would I go about doing a bimnary clock at all? Thats sounds totally messed up LoL.... and what would I use for outside just like a normal clock and make a turing program using binary numbers to keep with the time?
Tony




PostPosted: Tue Jan 11, 2005 9:13 am   Post subject: (No subject)

Think Geek Laughing

Posted Image, might have been reduced in size. Click Image to view fullscreen.
brianrood




PostPosted: Tue Jan 11, 2005 6:01 pm   Post subject: thanks

Thank you very much I think I am going to try and get thios binary clock to work, I just need a piece of cardboard, and sum led's probably from your neighbourhood radio shack Lol... Thanks for the help,
Oh snap how would I go about doing the turing part? can someone start me off with a line or two or an explanation.. I am dumb..
Neo




PostPosted: Tue Jan 11, 2005 6:12 pm   Post subject: (No subject)

For that you'll need to consult your teacher. If you made a circuit board Im sure he has told you how to turn on an led using turing. I think its the parallelput() command. IMO a binary clock sounds too simple and would be useless. Last year I made an etch-n-sketch machine controlled using a homemade joystick through turing... you can try that idea if you want?
josh




PostPosted: Tue Jan 11, 2005 6:27 pm   Post subject: (No subject)

the turing commadns used for interfacing are:

code:

parallelput ()

and
code:

parallelget ()

inside of the brackets is the pin that you want to send the signal down or receive the signal from.

I have only done output interfacing programs but lets say I connected D0 (that is the first output pin, D is for data, they range from D0 - D7 giving you a totla of 8 unique paths)

and I want to send a signal down D0 to make the led connected to it light up, I would type:
code:

parallelput (1)


to stop all the signals I would use:
code:

parallelput (0)


bassically the data table looks like this:
code:

parallelput (0) kills signals
parallelput (1) sends down D0
parallelput (2) sends down D1
parallelput (4) sends down D2
parallelput ( 8 ) sends down D3
parallelput (16) sends down D4
parallelput (32) sends down D5
parallelput (64) sends down D6
parallelput (128) sends down D7


so if you wanted to send a signal down D0 and D1 you would use:
code:

paralleput (3)

because 1 + 2 is 3.

so basically you could display any 8 bit number just by typing the number in the brackets of parallelput, then connect each wire to a differnet LED, and it will display properly, now you just need a few rows to represent the different hours, minutes, and seconds and you just need to get the differnet hours, minutes, and seconds from the sytem clock.

The part I am not sure about is what you would do since their is only 8 output wires, you will have to get creative to figure out beause you will need more than 8 LED's.

EDIT: sorry, didn't see neo had already mentioned parallelput (), I was typing this when he posted.
Sponsor
Sponsor
Sponsor
sponsor
TheZsterBunny




PostPosted: Wed Jan 12, 2005 8:06 am   Post subject: (No subject)

neo,

do you mean you drew on the screen with the joystick?

that sounds about the same difficulty as the binary clock.

only, the bclock wouldn't be as flashy.

you'd kinda have to have some sort of cool turing component, right?

perhaps different clock modes? (i.e. 12/24/countdown/alarm)

ooh! how about tri-colored leds? green in morning, blue in day, and red at night?

-Z
Tony




PostPosted: Wed Jan 12, 2005 9:31 am   Post subject: (No subject)

different colour leds are not that good of an idea since he'll be presenting it for 5 minutes tops during his class... nobody is going to wait for 12 hours to see the clock do what it does in a different colour..

the countdown mode sounds interesting enough. Especially if you time it right (such as count 1/10th of a second or something) to have a nice LED animation going
TheZsterBunny




PostPosted: Wed Jan 12, 2005 11:51 am   Post subject: (No subject)

1 /10?

binary!

1/8th of a second.

Smile

-Z
Tony




PostPosted: Wed Jan 12, 2005 1:19 pm   Post subject: (No subject)

details Rolling Eyes
but yes, 1/8th makes more sence
brianrood




PostPosted: Tue Jan 18, 2005 10:01 pm   Post subject: ok got project now sum turing help...

Ok, thanks for everything so far guys, I figured after some time I needed some chip a parallel chip my teacher did not have so we scrapped the binary clock, and now I am just going to be simple and make a stop light. I got creative and went and bought one of those cool stoplight lights and glow in different patterns and I unwired it all and took off the power cord so I am left with the three lights and the wires to them... I was wondering how I would do the coding I had the idea of using this:
var Green : int := 1
var Yellow : int := 2
var Red : int := 4
parallelput (Green)
loop
if parallelput (Green) then
delay (10000) and parallelput (Yellow)
end if
if parallelput (Yellow) then
delay (4000) and parallelput (Red)
end if
if parallelput (Red) then
delay (10000) and parallelput (Green)
end if
end loop

what am I doing wrong, and how could this be improved other then maiing it a big if statement with elsif's....???
josh




PostPosted: Wed Jan 19, 2005 12:01 am   Post subject: (No subject)

first please use code or syntac tags nect time you post.

I don't think that your if's will work becuaese I am don't think it will recognize if parallelput (green).

what you need ot do is make another variable for the status and have that change depending on the light, something like this:

code:

var Green : int := 1
var Yellow : int := 2
var Red : int := 4
var status : string

parallelput (Green)
status := green
loop
   if status = green then
      delay (10000)
      parallelput (Yellow)
      status := yellow
   elsif status = yellow then
        delay (4000)
        parallelput (Red)
        status := red
  elsif status = red then
     delay (10000)
     parallelput (Green)
     status := green
     end if
end loop



so this way the if is dependant on the status variable and not on detecting what it is parallelputing,

Give that a try and if it does not work tell me adn i will try and fix it
brianrood




PostPosted: Wed Jan 19, 2005 12:03 am   Post subject: (No subject)

ok thanks for that, I will try it tomorrow and I will get back to you, and I have no life so I can reply right after you responded LoL, thanks a lot though man..
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 2  [ 22 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: