2017년 4월 4일 화요일

[Arduino Uno R3] Electric flow with jumper wire, LED, resist.

1. Demo


2. Code

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
}

3. Description

 - Electric flow : From D31 on Arduino to GND on Arduino
 - Electric has to flow from + to - (GND). So it goes from D13 to + pin on Bread Board and to - leg on LED and to + leg on LED and to a resist and to - pin on Bread Board and to GND on Arduino.
 - Green arrows is showing to go to where electic flow.

댓글 없음:

댓글 쓰기