Resistors

Symbol

Unit – Ω (ohm)

A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. Resistors are common elements of electrical networks and electronic circuits and are ubiquitous in electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome). Resistors are also implemented within integrated circuits, particularly analog devices, and can also be integrated into hybrid and printed circuits.

Series and parallel resistors




http://en.wikipedia.org/wiki/Resistor

► Color Code

The resistor value can be identify by the color code on the resistors. The last first 2 or 3 bands are the base value, the second last band is the multiplier value and the last band is the tolerance percentage. Please refer to the table in the figure below for the values of different color code.

The program contains one variable, two user define functions, and involved three pre-defined functions. Below we will explain them one by one.

function setup() – this function runs once when the program starts, usually we will put all initialization code here. For example, setting the pin mode and initializing the libraries and objects we used in the program.

function loop() – this function runs over and over again (after the setup() function is called), as long as the Arduino board has power.

Note that on the Arduino board there is a reset button, you can use it to terminate the current running program and restart the program (i.e. setup() will run once and than loop() will repeated over and over).

variable ledPin – the pin number we set as output (pin 13, check your board). Note that pin 13 is a special pin as it has its own LED on the board. When you set pin 13 is output pin and set it with a HIGH voltage, the LED on the board is on. Also this pin has build-in 1K resistor, so you can plug an LED from pin13 to GND directly without burning it.

Important note: if you set other pins as output, remember to use resistors in the circuit, otherwise it will burn the components because other pins do not have build-in resistor.

function pinMode() – this function is used to set the pin mode for digital pins (0-13). Two pin mode are possible: either INPUT or OUTPUT.

function delay() – this function pauses the program for the amount of time (in miliseconds) (1000 ms = 1s)

function digitalWtite() – this function writes a HIGH (5V) or a LOW (0V, ground) value to a digital pin.