Created
July 12, 2024 00:58
-
-
Save hlog2e/1eba857010a1088fe3b82d62437b5e99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int SENSOR = 0; // the analog pin connected to the sensor | |
void setup() { | |
Serial.begin(9600); //시리얼 모니터 사용을 위한 초기화 | |
} | |
void loop() { | |
int value = analogRead(SENSOR); // 센서에서 아날로그 read 로 값을 가져와서 int value 에 저장 | |
Serial.println(value); | |
//(만약 value 에 따른 조건부 코드를 실행하라면 여기에 추가하면됨.) | |
delay(100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment