IDE

(Integrated Development Environment, the software you need to run on your laptop so that your laptop can talk to the Arduino)
Plug in the Arduino to your laptop USB port.
Set the board and port in the IDE.

Blink Example

Load the Blink Example, check the code, and upload it to the Arduino.

Voltages

It’s a electronic device, so it should be giving out voltages. Let’s poke it with the meter and see.
Connect the black lead on the voltmeter to one of the three GND pins.
Connect the red lead to the 5V pin. Should be 5V. Disconnect the red lead.
Connect the red lead to the 3V3 pin. Should be 3.3V. Disconnect the red lead.
Connect the red lead to the #13 pin. Should be 5V, sometimes, and 0V other times. See?

Add External LED

Plug in the pin adapter with the green, blue, and grey wires.
[[circuit: arduino, resistor, LED]]
Hack the example to control the external LED.

Most Basic Program

Let’s write the most basic program: File, New Sketch.
int outpin = 10;
void setup() {
  pinMode(outpin, OUTPUT);
}
void loop() {
  digitalWrite(outpin, 1);
}
What’s going on here?
Variable: I called it “outpin”. It’s a place I can store a number, a box in the mind of the chip on the Arduino. I stored the number 10 to refer to place where the grey wire is connected, at pin #10
I had to tell the IDE software what type of number I wanted to put in the box, so I said “int” first, which is short for integer. An integer is a whole number, like 0, 1, 2, and so on.
void setup() is something you have to have. Whatever is inside the curly braces { in here} happens once, whenever the power comes on, or when you upload a new code.
pinMode tells the chip brain on the Arduino what it should do with that pin. OUTPUT lets it push a voltage out, either 5V or 0V.
void loop() {does whatever is inside these curly braces over and over again, as long as the power stays on}
digitalWrite(pin_number, value) sets the output voltage to 0V if you send a value of 0, and sets the output voltage to 5V if you send a value of 1. So we keep setting it to 1, over and over and over again. We keep turning the light on, but it’s already on, so nothing changes.
Change
digitalWrite(outpin, 1);
to
digitalWrite(outpin, 0);
And re-upload the code. Now we turn the light off, over and over and over again.
So now we know how to blink, but we have to upload the code to change it from on to off.
We can do better. Change the code to
void loop() {
  digitalWrite(outpin, 1);
  digitalWrite(outpin, 0);
}
Hmm. Well, we are turning it on and off so fast that we can’t see it. Faster than the eye can see, literally.
void loop() {
  digitalWrite(outpin, 1);
  delay(200);
  digitalWrite(outpin, 0);
  delay(200);
}
the delay() function expects a number in milliseconds, 1/1000ths of a second.
500 ms is half a second.
There, that’s blink. We have control of the output.

Input

Let’s see if we can take some input.
New program (yes, it’s called a “sketch”, sigh).
int inpin = 11;
void setup() {
  pinMode(inpin, INPUT);
  Serial.begin(9600);
}
void loop() {
  int inpin_reading = digitalRead(inpin);
  Serial.print(inpin_reading);
  Serial.println();
}
Upload this, and then select Tools, Serial Monitor to see what comes back.
Serial.begin tells the Arduino it is going to talk to the computer over the USB connection. 9600 is the speed at which it is going to talk.
Serial.print( sends whatever number is inside the parentheses) to the computer.
Serial.println() sends the Enter command to start a new line.
Touch the blue wire to 5V. You should get a 1 in the data coming back.
Touch the blue wire to GND. You should get a 0 in the data coming back.
Touch the blue wire with your fingers. You may get 1 sometimes and 0 other times.

Conditional

Let’s put it all together in a simple conditional code.
int outpin = 10;
int inpin = 11;
void setup() {
  pinMode(outpin, OUTPUT);
  pinMode(inpin, INPUT);
}
void loop() {
  int inpin_reading = digitalRead(inpin);
  if (inpin_reading == 1)
  {
    digitalWrite(outpin, 1);
  }
  else
  {
    digitalWrite(outpin, 0);
  }
}
STRONG NOTE: if you are asking if something is equal to something else, you have to ask with the == sign, two equal signs in a row. If you try to ask with one = the program will make the one equal to the other, which is results in a condition which is always true)
The new part here is the
if (condition)
{do this}
else //otherwise
{do this}
If (the sun is up)
{get out of bed}
else
{go to bed}
Still pretty boring. Push the button, and the light comes on, big deal.
Change the condition to
if (inpin_reading == 0)
and it works the other way. Push the button, the light goes off.
But, it can be many other things.
if (someone is close enough to your artwork)
{make a particular sound}
if (someone is even closer to your artwork)
{make a different sound}
if (the commander of the Apollo 11 moon lander says it’s OK to land)
{cancel the landing abort sequence}
Margaret Hamilton invented the “Human in the Loop” program that we all take for granted now.

Neopixels

https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels
[[circuit, power the neopixels from supply, share ground (star point)]]
Download the Library, do the name change and place the file in the correct folder (Arduino/Libraries)
https://github.com/adafruit/Adafruit_NeoPixel
Blink the first pixel in one color.

While

while (index < pixel_count){
index = index + 1;
//do some stuff
}

Analog input

[[circuit: analog in from force sensitive resistor, with bias resistor]]
Serial reply, see the range

Map command

new value = map(value, old_low, old_high, new_low, new_high);
Serial reply, see the new range
Uses:
bar graph
color control
brightness control