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

Username:   Password: 
 RegisterRegister   
 Light show (parallel port interfacing)
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Insectoid




PostPosted: Mon Jun 09, 2008 10:03 am   Post subject: Light show (parallel port interfacing)

I did this for my computer engineering class. I think it was pretty cool.
Put simply, it's an LED light show!

To work this, you need to have an 8 (or more) LED lineup on a breadboard with pins 2-9 into the lights and a ground.

Turing:

var num := 1
var num2 : int := 256
loop
    for y : 1 .. 3
        num := 1
        num2 := 1

        for x : 1 .. 8
            parallelput (num + num - 1)
            num *= 2
            delay (75)
        end for

        for x : 1 .. 8
            parallelput (num - num2)
            num2 *= 2
            delay (75)
        end for
        parallelput (0)
    end for




    for y : 1 .. 3
        num := 1
        num2 := 256
        for x : 1 .. 8
            parallelput (num)
            delay (50)
            num *= 2
        end for
        for x : 1 .. 8
            num := round (num / 2)
            parallelput (num)
            delay (50)
        end for
    end for

    for y : 1 .. 3
        num := 1
        num2 := 128

        for x : 1 .. 4
            parallelput (num + num2)
            delay (100)
            num *= 2
            num2 div= 2
        end for

        for x : 1 .. 4
            num div= 2
            num2 *= 2
            parallelput (num + num2)
            delay (100)
        end for
    end for







    for x : 1 .. 10
        parallelput (0)
        delay (100)
        parallelput (255)
        delay (100)
    end for
    for x : 1 .. 8

        parallelput (num2 - 1)
        num2 := round (num2 / 2)
        delay (100)
    end for
    parallelput (0)
delay (1000)
    end loop
Sponsor
Sponsor
Sponsor
sponsor
death bringer




PostPosted: Tue Jun 10, 2008 2:11 pm   Post subject: RE:Light show (parallel port interfacing)

Doesn't work for me....
Aziz




PostPosted: Tue Jun 10, 2008 3:25 pm   Post subject: RE:Light show (parallel port interfacing)

Quote:
To work this, you need to have an 8 (or more) LED lineup on a breadboard with pins 2-9 into the lights and a ground.


Do you have an "8 (or more) LED lineup on a breadboard with pins 2-9 into the lights and a ground"? That's why it didn't work.

Insectoid, it'd be cool if you posted the circuit diagram so others can more easily understand what's going on. Just draw it up in paint or something.
Insectoid




PostPosted: Tue Jun 10, 2008 4:33 pm   Post subject: Re: Light show (parallel port interfacing)

Well, that would be a good idea. Here you all are!


LED Diagram.bmp
 Description:
Circuit diagram for light show.
 Filesize:  696.05 KB
 Viewed:  364 Time(s)

LED Diagram.bmp


MihaiG




PostPosted: Tue Jun 10, 2008 4:46 pm   Post subject: Re: Light show (parallel port interfacing)

im doing somethign similar for my ISU,
but i uses 8 leds, and a wand that moves back and worth really fast, and you can enter text in and it will display it in the air due to persistence of vision, seems nifty as a demo,
cool stuff
Insectoid




PostPosted: Tue Jun 10, 2008 4:51 pm   Post subject: RE:Light show (parallel port interfacing)

Sweet! you can buy those in the store, but if you can make it yourself, huzzah!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: