Day 1 02 - serial
2024. 1. 15. 18:57ㆍarduino
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(9600);
Serial.println(78, DEC);
Serial.println(78, HEX);
Serial.println(78, BIN);
Serial.println(1.23456, 0);
Serial.println(1.23456, 2);
Serial.println(1.23456, 4);
// pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
시리얼 통신(10진수, 16진수, 2진수)
LED 1초마다 HIGH, LOW
'arduino' 카테고리의 다른 글
Day1 06_LED8 (0) | 2024.01.17 |
---|---|
Day1 05_millis(라이브러리 호출) (0) | 2024.01.17 |
Day1 04_LED_mission (0) | 2024.01.17 |
Day 1 03 - for LED (0) | 2024.01.15 |
Day 1 01 - LED (0) | 2024.01.15 |