Lesson 6: The Serial Monitor
이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
English
The board can talk
Serial.begin(9600);opens the cable to the computer at 9600 bits per second.Serial.println("Hi");sends a line. You see it under the board, in the Serial Monitor.Serial.printdoes the same without a new line.
int count = 0;
void setup() {
Serial.begin(9600);
Serial.println("Hello!");
}
void loop() {
count = count + 1;
Serial.print("Count: ");
Serial.println(count);
delay(1000);
}
- This is how Arduino programmers find bugs: print the numbers and look at them.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Print Hello, Arduino! once, when the board starts.
출력을 보려면 '실행'을 클릭하세요.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Count down: print 5, 4, 3, 2, 1 (one number on each line), then Go!. Use a for loop in setup().
출력을 보려면 '실행'을 클릭하세요.