Shop OBEX P1 Docs P2 Docs Learn Events
bs2 homework board ? Traffic light — Parallax Forums

bs2 homework board ? Traffic light

amelecsol2000amelecsol2000 Posts: 4
edited 2007-03-31 21:20 in BASIC Stamp
············ I am experimenting with traffic signal code.( 3 led's )
·············I can't seem to get anywhere with a code.

············ I would like to know if someone could tell me how to write the code for the traffic· signal one side,·I will then experiment to ·modify it to control 4 sides.

············ I just need to get the initial 3 led's working.

············ Any advice or input would be appreciated.

·············Thank you

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



·········· If you believe you can't·, you are absolutely right!!!!

Comments

  • ForrestForrest Posts: 1,341
    edited 2007-03-31 14:00
    The What's a Micontroller book does a good job of explaining LED circuits and has many example programs. Download it here www.parallax.com/dl/docs/books/edu/wamv2_2.pdf
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-03-31 14:06
    Here's a program my 12 year old son wrote:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    DO
    · HIGH 14
    · LOW 13
    · LOW 12

    · PAUSE 2000
    · LOW 12
    · LOW 14
    · HIGH 13
    · PAUSE 2000

    · HIGH 12
    · LOW 13
    · LOW·14
    · PAUSE 900
    LOOP


    END


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-03-31 16:58
    There is another thread on this topic a few posts down...Here is the link...

    http://forums.parallax.com/showthread.php?p=641686

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • amelecsol2000amelecsol2000 Posts: 4
    edited 2007-03-31 21:20
    ············ Thank you everyone, back to the HomeWork Board!!!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    ·········· If you believe you can't·, you are absolutely right!!!!
Sign In or Register to comment.