Sengkang ALP
Monday, 18 July 2016
Lesson 3 - Activity 1B (Red & Green LED (Series))
Activity 1
Assembling Red and Green LED (Series)
Materials needed:
1 X Arduino Board
1 X USB
1 X Laptop
2 X LED
3 X Jumper Wires
2 X 330Ω resistors
Red and Green LED (Series)
Codes:
int led = 7;
void setup()
{
pinMode(led, OUTPUT);
}
void loop()
{
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay (1000);
}
Wednesday, 6 July 2016
Lesson 3: Activity 1A (Red & Green LED (Parallel)
Activity 1
Assembling Red and Green LED (Parallel)
Materials needed:
1 X Arduino Board
1 X USB
1 X Laptop
2 X LED
5 X Jumper Wires
2 X 330Ω resistors
Codes:
const int ledG = 13;
const int ledR = 7;
void setup ( )
{
pinMode(ledG, OUTPUT);
pinMode(ledR, OUTPUT);
}
void loop ( )
{
digitalWrite (ledG, HIGH);
digitalWrite (ledR, LOW);
delay(1000);
digitalWrite (ledG, LOW);
digitalWrite (ledR, HIGH);
delay(1000);
}
Monday, 4 July 2016
Lesson 2 - [Codes] Blink LED
LED Blink Codes
const int led = 13;
void setup ()
{
pinMode(led, OUTPUT);
}
void loop ()
{
digitalWrite (led, HIGH);
delay(1000);
digitalWrite (led, LOW);
delay(1000);
}
Copy and Paste the codes to the Arduino Sketch.
Lesson 2 - [Output] LED
LED
Materials needed:
1 Arduino
1 LED
1 USB
1 Laptop
LED Blink Assembly
Please Note:
LED has polarity, longer leg is Positive (+ve), shorter leg is Negative (-ve)
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)