Crash Course Arduino Input Output

Reading: Electricity

First hour: Inputs

Using a meter to read Voltage. One battery, two batteries, three batteries, in a pack.

In most cases you want to connect the black lead to ground.

Graphite variable resistor with alligator leads. Black on meter and black from battery to the same end. Red on meter to middle, slide up and down. Variable voltage, analogous to position of the probe. Analog. 

Commercial variable resistor, same setup. 

Reading: Arduino Setup. 

Set Board, Set Port, Run Blink.

Basic analog_input_test code, write to serial port:  

Star point ground. Potentiometer output to analog input A0, using external battery supply.

Watch the number go up and down.

Screen Shot 2015-09-29 at 8.39.21 PM

Force sensitive resistor. Fixed readout resistor, 1kΩ,

Skin conductance. On one hand only, not across the heart. 1M fixed readout resistor.

[Do I have any kind of stretch sensor? No.] 

Light sensor, a self contained unit, no readout resistor needed. 

Passive IR sensor, digital input.

Switch, with pullup resistor. 10k

Second Hour: Outputs

better_blink

Blink external port, show on volt meter.

Add LED and R200 resistor.

Test probe connected to Arduino.

Transistor output circuit connected to the Arduino.

Transistor output circuit connected to the Arduino. Show pseudo-analog out, PWM.

pseudo_analog_ramp-ino

Input controlling output. Pressure or light or variable resistor analog input to pseudo-analog out. MAP command.

pseudo_analog_map-ino

Change out LED for motor (remove LED current limit resistor). Demo with solenoid. 

Hook up a Servo Motor, on external power.

Pressure or light or variable resistor analog input to servo motor output: simple_system_test code