Note2 – Blink sketch

ArduinoNote List-page
PREVIOUS: Note1 – ARDUINO

Hand-on #1 : Blink

-Arduino를 경험해 본다.
-Sketch IDE를 설치, 간단한 Blink Example 따라하기

Preparation Materials

Arduino Mega

(* form http://duino4projects.com/multiserial-mega-using-arduino/)

Spec. Description
Microcontroller ATmega2560
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 54 (of which 15 provide PWM output)
Analog Input Pins 16
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 256 KB of which 8 KB used by bootloader
SRAM 8 KB
EEPROM 4 KB
Clock Speed 16 MHz

Blink Sketch :

  • Load Blink Sketch : IDE의 파일>예제>Basics>Blink

    Blink example

  • Blink codes

    // the setup function runs once when you press reset or power the board  
    void setup() {  
      // initialize digital pin 13 as an output.  
      pinMode(13, OUTPUT);  
    }  
    // the loop function runs over and over again forever  
    void loop() {  
      digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)  
      delay(1000);              // wait for a second  
      digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW  
      delay(1000);              // wait for a second  
    }  
    

Pin 13 회로도에서 살펴보자

L LED on Schemetic

Pin 13으로 L LED를 On/Off 한다.!

L LED on Board

Configuration Platform

  • IDE 메뉴의 도구>보드>Arduino Mega of Arduino Mega 2560
    Selett Serial Port

Compile

  • IDE 메뉴의 스케치>확인/컴파일
    Verify

Program

  • IDE 메뉴의 파일>프로그램어를통해업로드
    Upload

NEXT: Note3 – Hello world

Advertisements

3 thoughts on “Note2 – Blink sketch

  1. Pingback: Note1 – Arduino | embeddist

  2. Pingback: Note3 – Hello World | embeddist

  3. Pingback: Arduino를 IoT 기기로 만들어 보기 – Webserver 따라하기 | B Story ..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s