Thursday, January 20, 2011

Micro controllers and how it enhances your playing time with your toy :D

ok so i really liked this last class meeting since we finally, after successfully building our own serial connection, got to do something with computers which i know a lot more than i do know about circuits and electronic boards :D
so we built a circuit diagram with micro controller and a LED and wrote a program with programing editor v5.3.2 to make the LED flash periodically.

and here is the code line that we used
main:
         high 1
         pause 1000
         low 1
         pause 1000
goto main

these lines of codes just shows how simple and straight forward it is to work with this program ( maybe not!!! we'll see :D)
high means to turn the 1 which here is the LED light on
and pause 1000 means wait 1 second and low means to turn the LED off
after this we did a little bit more complicated program with loops and an analog sensor and one extra LED on the board here is the result


 what happens here is the analog sensor senses the change in lightness and darkness of the suronding environment and as it senses more darkness it tells the micro controller to let less current flow into the LEDs

No comments:

Post a Comment