Sensory Input: Programmer, Voltage Regulators Seral To USB Converter
Sensory Input: Programmer, Voltage Regulators Seral To USB Converter
input.
Thousands of sophisticated
sensors available
Arduino
Development board for the
ATMega328
Inludes
Programmer,
Voltage Regulators
CHEAP $
30! Has everything you need
Arduino C
Template
void setup() {
// Setup stuff to only run once at the
beginning
}
void loop()
{
// This function gets called indefinatly
Peripherals
Analog to Digital
Converters (ADC)
Counters/Timers (TMRx)
input or output
pinMode(pinNumber, pinState)
pinMode(13, INPUT)
pinMode(13,
OUTPUTArduino
Digital I/O
Example
int ledPin = 13;
void setup() {
// Set the digital pin as output:
pinMode(ledPin, OUTPUT);
}
void loop()
{
// Bring the pin high (1)
digitalWrite(ledPin, HIGH);
})
Arduino PWM
Command
AnalogWrite(Pin,
DutyCycle)
DutyCycle = 0 0%, 127
50%, 255 100%
Pin can be 3, 5, 6, 9, 10, or 11