Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/30/10 11:30
Read: times


 
#179743 - delay
Responding to: ???'s previous message
Hi thanks for the replies guys, some of them made me laugh :). We’ve only just started the module on microprocessors about 2 weeks ago so im not to clued up on the terminology. But what we have is a program called ride and we have to type the pragma bit in every time we right a program, the tutor did say it was something to do with C…… so this is the way our tutor says we have to write it and then we use another program called flick to load the hexfile on to the robot.

The sequence that I wrote earlier is what I was given and he said it was the lighting sequence for a pelican crossing. Looking from the cars pont of view, the lights are green then a time then they go amber for a shorter time then they go red. When the lights are red the buzzer should sound. When the lights are on red , the pedestrians lights are green so they can go. Then after the same delay as the green light being on . the red light turns to a flashing amber for a short delay and then back to green and the cycle resumes.
Im not too clued up with sub routines or any thing like that . Im still abit confused how I can loop. I think I could use the same delay piece of code I wrote for the green light, right at the start of the program . but not sure how to use it.


List of 25 messages in thread
TopicAuthorDate
traffic lights            01/01/70 00:00      
   you are thus forgiven, but            01/01/70 00:00      
   Oh, how very British            01/01/70 00:00      
      Menagerie of crossings            01/01/70 00:00      
         Animal crossings...            01/01/70 00:00      
            zebra cross            01/01/70 00:00      
               Zebra crossing project            01/01/70 00:00      
                  trafic light            01/01/70 00:00      
                     Wrong.            01/01/70 00:00      
                        Laura used MCU            01/01/70 00:00      
                           Please read posts carefully!            01/01/70 00:00      
               See the persons in that photo            01/01/70 00:00      
                  Double Pun            01/01/70 00:00      
                     Good one!            01/01/70 00:00      
   delay            01/01/70 00:00      
      Oh dear!            01/01/70 00:00      
      Sequence            01/01/70 00:00      
      Robot?            01/01/70 00:00      
   Smith & Jones?            01/01/70 00:00      
      Too many names?            01/01/70 00:00      
         there once was a TV series ... "alias Smith and Jones"            01/01/70 00:00      
            Alas, Smith & Jones            01/01/70 00:00      
            A word to brighten my day            01/01/70 00:00      
      seems like here            01/01/70 00:00      
         there's demand for that here            01/01/70 00:00      

Back to Subject List