Task 21:
int del = 200;
int LEDPin = 13;
void setup()
{
Serial.begin(9600);
pinMode(LEDPin, OUTPUT);
}
void loop()
{
digitalWrite(LEDPin, HIGH);
Serial.println("Blink");
delay(del);
digitalWrite(LEDPin, LOW);
delay(del);
}
Task: 22
int del = 200;
int LEDPin2 = 2;
int LEDPin3 = 3;
void setup()
{
Serial.begin(9600);
pinMode(LEDPin2, OUTPUT);
pinMode(LEDPin3, OUTPUT);
}
void loop()
{
digitalWrite(LEDPin2, HIGH);
Serial.write("Red ");
delay(del);
digitalWrite(LEDPin2, LOW);
delay(del);
digitalWrite(LEDPin3, HIGH);
Serial.print("Yellow");
delay(del);
digitalWrite(LEDPin3, LOW);
delay(del);
Serial.println();
}
Task 23:
I was unable to edit the Wikieducator page so i shall just show my version of the Arduino here.
Arduino Nano:
For more information see http://www.arduino.cc/en/Main/ArduinoBoardNano.
Thursday, April 29, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment