Luminosity Sensor Variable Module(SEN040130)

아두위키 : Arduwiki
ArduWiki (토론 | 기여)님의 2024년 3월 24일 (일) 11:41 판 (Created page with "{{#seo:|title=아두위키 : 아두이노 조도 센서 가변 모듈(SEN040130) 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 조도 센서 가변 모듈(SEN040130), 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 조도 센서 가변 모듈(SEN040130)을 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능...")
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

The Luminosity Sensor Variable Module (SEN040130) is designed to measure the intensity of light in its environment. This sensor module is often used in projects where light levels need to be monitored or controlled, such as in automatic lighting systems, grow lights for plants, or any application where changes in light conditions need to be detected.

Specifications

  • Operating Voltage: 3.3V ~ 5V
  • Output Type: DO, AO
  • Detection Angle: 160 degrees

Connection

The circuit utilized in the example code below.

An LED can be replaced with another module or omitted entirely.

Resistor Luminosity Sensor LED Arduino
VCC 5V
GND - GND
Connection +
AO A0
Connection D7

Example Code

// Code to turn on the LED when the luminosity sensor value exceeds 470.
#define led 7
#define cds A0

float val = 0;

void setup(){
  pinMode(led, OUTPUT);
  digitalWrite(led, LOW);
}

void loop(){
  val = analogRead(cds);
  if(val > 470) digitalWrite(led, HIGH);
  else digitalWrite(led, LOW);
}

Execution Result