## Newbie alert : Simple Electrical Theory

 Getting started : defining the TermsIn electrical theory, current flows from positive to negative. Positive is designated (+) and is usually red. Negative or ground is designated (-) and can be black or brown.Current flows because of the force between positive and negative. This is measured in Volts and is what is created to make current flow. Current is the amount of electricity that flows and is measured in Amps.Before a current can flow, it must make a circuit. ResistanceResistance is defined as the ratio between voltage and current. It is what opposes the flow of electricity through a circuit and is measured in Ohms. . Assessment : Use a breadboard to construct a circuit with a battery, led, switch and resistor. Skill Be able to determine the value of a resistor from it's colour code. Vocabulary Amps, milliAmps,

## Sub system : the Arduino board

can you identify the following on your board
• the ATMega328 chip
• the 16Mhz clock
• reset switch
• the port you connect to your computer
• digital i/o ports
• analogue i/o ports
• ports where power is available
• external power port
Smarty pants speedy kids might wish to get straight to the "good stuff". If you have an Arduino kit, here is a set of exercises for you to try.

## Sparkfun inventors' guide(PDF)

About the board from the Arduino web site

• ### Topic 4

 Breadboards are one of the most fundamental pieces when learning how to build circuits. They allow you to connect components and test prototype projects before movind on to producing circuit boards. Sparkfun breadboard tutorial

## Connect up a LED in a circuit

• ### Topic 6

 Resistance Skill Be able to determine the value of a resistor from it's colour code.

## Sequence : Your first sketch

 Arduino calls its applications or programs sketches. To get the feeling for structure, there are four main parts to an Arduino. Documentation Varible declaration Setup Body of program Step 1 : Write a simple sketch to do nothing using only the words loop, setup, void, void and {, { },  } Required Computer Arduino USB cable Load your sketch to your Arduino. No one ever gets it right first time. Check your cable is plugged in. The Arduino lights have lit up You have selected the correct Arduino board You have selected the correct port (Tools/port) There are no errors in your code The next couple of examples deal with sketches running in sequence. Vocabulary loop, setup, void, void

## Sequence :  Making the Arduino blink

 For newbies, there is a lot happening here. We want a LED to blink, then hack the code. The big danger here is we kill the LED by putting too much electricty through. Here are some really basic lessons to be learnt, mainly how to set up a breadboard. This uses pins 13 and gnd a 220 ohm resistor (red red black) (the example uses brown black red) a LED a breadboard The challenge is to figure out which way the tie points run and how to connect up the components. The code // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin 13 as an output. pinMode(13, OUTPUT);} // the loop function runs over and over again forevervoid loop() { digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(13, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second}

## The IDE and programming

An integrated development environment (IDE) is a software application that provides an enviroment for Aduino users to write programs. An IDE normally consists of a source code editor, automatic build tools and a debugger.