1
TinyLily / Re: Pinout documentation
« on: May 02, 2014, 02:07:27 AM »
Something else I am sure that everyone else knows but which I feel compelled to document here: The a0, a1, a4 & a5 pins are also digital output pins.
THe next experiment will try and see if any of them are also PWM pins.
Let's not all chime in here at once...
Cheers.
THe next experiment will try and see if any of them are also PWM pins.
Code: [Select]
/*
Blink a0, a1, a3, a4 pins
*/
int pin;
void setup() {
// initialize the pins as an output.
pinMode(14, OUTPUT);
pinMode(15, OUTPUT);
pinMode(18, OUTPUT);
pinMode(19, OUTPUT);
}
void loop() {
pin = 14;
digitalWrite(pin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(pin, LOW); // set the LED off
pin = 15;
digitalWrite(pin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(pin, LOW); // set the LED off
pin = 18;
digitalWrite(pin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(pin, LOW); // set the LED off
pin = 19;
digitalWrite(pin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(pin, LOW); // set the LED off
}
Let's not all chime in here at once...
Cheers.