hmirrobotics

Robotics November 20, 2011

Posted on: November 26, 2011

Robotics November 20, 2011

On Sunday’s class we didn’t do anything extra. Basically, all we did was modify our original program for the four circuits of the two LEDS and two push buttons. For the most part we modified how long each LED would light up when either of the push buttons were pressed or when both were pressed together. This is the program that we constantly modified to fit the description given to us on our program slips:

The last command in the picture is loop but it cut off. In order to modify our program we need to know how many milliseconds there are in a second. There are exactly 1000 millisecond in one second so 1000ms=1s.So for example if we want pin 14’s LED to turn on for half a second and pin 15’s LED for two seconds, I would change the PAUSE for in3 to 500 and the PAUSE for in4 to 2000. And if I wanted both of the LEDs to turn on for one and a half second when both of the push buttons were pressed I would change the PAUSE that comes after the IF…AND…THEN command. It was quite easy once I got the hang of it and quite a lot of fun every time I got a success. The last program we got was quit challenging. Well it seemed hard but it turned out we were stressing over nothing. The program told us all that we had to modify and it told us to use the OR statement. It was really hard to figure out at first what we were supposed to do with the OR statement. I mean, where in the program we were supposed to put it. Then, with the kind help of Mavra we figured out that we just replace the AND statement with the OR. We’re not sure whether what we did was right because class ended before we had a chance to ask Mrs. Thomson, our technology teacher if our  program was correct or not. But obviously there’s always next class.

Leave a comment

Categories