Monday, February 22, 2010

Electronic Lunch #2- Learning the basics of the micro processor (Ardunio)

To keep in mind:
Voltage: the potential for electrical energy

0= off 1= on, high voltage

Computer language is binary written with 1's and 0's

Binary is base two, just like decimal (the standard number format) is base 10.

This means that a binary number can be viewed as an addition of powers of two, just like a decimal number can be viewed as an addition of powers of 10.

i.e.
The number:
1778
Can be seen as:
1*10^3 + 7 * 10^2 + 7*10^1 + 8*10^0 = 1000 + 700 + 70 + 8 = 1778

For binary:
11010 = 1 * 2^4 + 1*2^3 + 0*2^3 + 1*2^2 + 1*2 + 0*2^0 = 26 (In decimal)


Computers can:
1) senses info
2) remembers data for later use
3) adds

Writing the code to send to the board (you can use programs such as Arduino and Processing)

-written in C, and then converted into binary by a compiler

-Digital pins read 5 volts so they are either on or off (If the board's operating voltage is 5V)
-On and off is represent by 1 and 0 respectively

-Analog- read voltages between 0-5 (If operating voltage is 5) then it goes through a special circuit that converts analog to digital (binary) number which represents the voltage.

-a function is a list of commands


Links:
http://arduino.cc/
http://www.ladyada.net/learn/arduino/index.html
http://www.processing.org

No comments:

Post a Comment