Shop OBEX P1 Docs P2 Docs Learn Events
I'm a newbie!! need a little help!! — Parallax Forums

I'm a newbie!! need a little help!!

RJRJ Posts: 2
edited 2009-06-16 13:06 in BASIC Stamp
Hi guys

I just started using my basic stamp 2.··The only reason why I bought the stamp was because I'm·taking a electronics class, that is based on the Basic Stamp. I'm not going into Electrical of any kind, but now that I started playing with it, I'm rather injoying the stamp!

Anyways, I was hoping someone could help me out. The project I'm working on is building a 4 way traffic light with crosswalks ran by buttons to change the light at a faster pace. I have most of it constructed, but I'm having trouble tying in the buttons·to the circuit, and writing a program for them.

Any help would be·Great, thank you
RJ·

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-06-14 00:15
    Write out exactly what needs to happen like you were explaining it to someone that didn't know what a traffic light was in great detail then break it down into small pieces and write code that will do each of those pieces. Put it all together and you have a program. If you haven't already, download "what's a microcontroller" and maybe "app;ied circuits" from the Parallax site.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • vaclav_salvaclav_sal Posts: 451
    edited 2009-06-15 00:29
    Sounds like a variation of popular "homework/ task/ exercise" of technical institution which should remain nameless to protect the innocent.
    However, your statement that you have everything done but the buttons and program is more concerning.
    Anyway, traffic controller could be implemented as state machine.
    I am including my attempt on such software. It is incomplete and contains extra leftovers code from other projects. Use it as guide only!!
    ·Cheers and happy coding Vaclav
  • RJRJ Posts: 2
    edited 2009-06-16 13:06
    Thanks Vaclav

    That really helped! I found some new routes to go and how to express the code more decisive. Thanks again.



    RJ
Sign In or Register to comment.