Computer Science Canada turing and engineering assignment |
Author: | brianrood [ 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 |
Author: | TheZsterBunny [ Mon Jan 10, 2005 8:32 pm ] |
Post 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 |
Author: | scottyrush13 [ Mon Jan 10, 2005 10:20 pm ] |
Post subject: | |
a binary clock eh ![]() you should do it lol sounds pretty neat |
Author: | brianrood [ 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? |
Author: | Tony [ Tue Jan 11, 2005 9:13 am ] |
Post subject: | |
Think Geek ![]() ![]() |
Author: | brianrood [ 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.. |
Author: | Neo [ Tue Jan 11, 2005 6:12 pm ] |
Post 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? |
Author: | josh [ Tue Jan 11, 2005 6:27 pm ] | ||||||||||||
Post subject: | |||||||||||||
the turing commadns used for interfacing are:
and
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:
to stop all the signals I would use:
bassically the data table looks like this:
so if you wanted to send a signal down D0 and D1 you would use:
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. |
Author: | TheZsterBunny [ Wed Jan 12, 2005 8:06 am ] |
Post 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 |
Author: | Tony [ Wed Jan 12, 2005 9:31 am ] |
Post 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 |
Author: | TheZsterBunny [ Wed Jan 12, 2005 11:51 am ] |
Post subject: | |
1 /10? binary! 1/8th of a second. ![]() -Z |
Author: | Tony [ Wed Jan 12, 2005 1:19 pm ] |
Post subject: | |
details ![]() but yes, 1/8th makes more sence |
Author: | brianrood [ 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....??? |
Author: | josh [ Wed Jan 19, 2005 12:01 am ] | ||
Post 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:
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 |
Author: | brianrood [ Wed Jan 19, 2005 12:03 am ] |
Post 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.. |
Author: | josh [ Wed Jan 19, 2005 12:04 am ] |
Post subject: | |
no problem, always happy to help a fellow engineering person, I just got home from work but I think I will go to bed now. |
Author: | brianrood [ Sun Jan 23, 2005 4:12 pm ] |
Post subject: | HELP BY SUNDAY NIGHT PLEASE!!! |
Ok, I am doing the stoplight, and I want to have a picture of a car driving upto the stoplight and depending on whether the light is green or yellow or red if it goes through it or stops, and waits, I am using the code above plus some added road and stuff, the stoplight road y value is 200. and what code I need to do to get the picture of my car to animate. The file of it is C:\My Documents\My Pictures\beamer.JPEG. Do I have to use a Pic.Draw command or something? Could someone take a few minutes and throw me the coding for this. Thanks, Brian |
Author: | josh [ Sun Jan 23, 2005 4:25 pm ] |
Post subject: | |
you need to use Pic.Screenload so you can keep loading the pic at the new coordinates. You can then have it so that when the light changes a variable is given a different value. depending on the value of the variable make the car move or not move using if statements. try doing something yourself and if it does not work out tell me and I will -post some code to help you out. |
Author: | TheXploder [ Sun Jan 23, 2005 4:44 pm ] |
Post subject: | |
What I did last year was, I modded the remote of a remote controlled tank to be controlled by the keyboard. So I could connect the remote control to the printer port and using truing I could send commands to the remote. Turned out licely and it even drew where the tank had traveled, but not to exact. |
Author: | brianrood [ Sun Jan 23, 2005 5:10 pm ] | ||
Post subject: | Here is what I got | ||
Can you tell me what is wrong with the car pic? I can get it to move, if I can get it on the screen... Thanks... |
Author: | josh [ Sun Jan 23, 2005 5:33 pm ] | ||
Post subject: | |||
is the pic saved in the same directory as the turing file? becuase if it isn't then you need to put a copy of the pic into the folder where the turing file is or you need to type in the full file path in the "" of hte pic.screenload comand. e.g.
|
Author: | Leftover [ Sun Jan 23, 2005 5:34 pm ] |
Post subject: | |
I co-op taught a comp eng class last year. If you still need ideas, some of the ones we has last year were: Stoplight (most common) Dot Matrix Scrolling LED sign 3x16 LCD screen displaying animation RC Car (one of those "popular" mini RC cars, he hooked the remote to the parallel port and put controlls and parallelput commands to control the car from the computer) Many interactive games with buttons, parallelput and parallelget commands and LED's Turning Parallel port into sound card by using turing, parallelput, and a speaker wired to a parallel port (played music using the composer in Turing) And the last one I remember was a small car modded with the head lights and break lights to turn on depending on the direction the wheels (motors) were spinning. |