Hard Drive POV clock

Posted by SkinnyMAN on Stack Overflow See other posts from Stack Overflow or by SkinnyMAN
Published on 2012-07-09T15:50:30Z Indexed on 2012/07/10 21:16 UTC
Read the original article Hit count: 110

Filed under:
|
|

I am building a hard drive POV clock. (google it, they are pretty cool) I am working on the code for it, right now all i want to do is get the hang of making it do simple patterns with the RGB leds. I am wondering if anyone has any ideas on how to do something simple like make a red line rotate around the platter.

right now what i have is an interrupt that triggers a function.

    int gLED = 8; // pins for RGB led strip
    int rLED = 9;
    int bLED = 10;

    attachInterrupt(0, ledPattern, FALLING);

    void ledPattern(){
        digitalWrite(gLED, HIGH);  // This will make a stable image of slice of the
        delayMicroseconds(500);    // platter, but it does not move.
        digitalWrite(gLED, LOW);
    }

That is the main part of the code (obviously I cut some stuff out that arduino requires) What I am trying to figure out is how can make that slice rotate around the platter. Eventually I will make the pattern more interesting by adding in other colors.

Any Ideas?

© Stack Overflow or respective owner

Related posts about c++

Related posts about c