const int sensorPin = A0; //조도센서가 연결된 아날로그 핀 void setup() { Serial.begin(9600); //시리얼 통신 시작 Serial.println("Welcome to LK World.!"); //시리얼모니터에 문자출력 } void loop() { int sensorValue = analogRead(sensorPin); //조도 센서에 값을 읽어들여 sensorValue에 저장 Serial.print("Light : "); //시리얼모니터에 문자출력 Serial.println(sensorValue); // sensorValue 변수값을 시리얼모니터에 출력 delay(500); //0.5초 시간 지연 }