5. setup() 환경을 설정하는데 사용된다.
loop() 실제 코드를 작성하는 부분
Serial.begin( ) 시리얼 통신을 시작한다.
Serial.print( ) 내용을 출력한다.
Serial.println( ) 내용을 출력하고 한 줄 밑으로 내린다.
6. pinMode(pin, mode);
각각의 핀의 용도를 결정한다.
(ex: INPUT, OUTPUT)
digitalRead(pin);
디지털 입력을 받아들인다. (ex: LOW, HIGH)
digitalWrite(pin);
디지털 출력을 한다. (ex: LOW, HIGH)
7. • Digital has two values: on and off
• Analog has many (infinite) values
• Computers don’t really do analog, they quantize
• Remember the 6 analog input pins---here’s how
they work
8. delay(ms)
주어진 시간만큼 실행을 지연 시킨다.
ex: delay(1000);
delayMicroseconds(us)
주어진 시간만큼 실행을 지연 시킨다
차이가 있다면 단위가 microseconds 이다.