'감지'에 해당되는 글 1건

  1. 2017.03.05 Hardware | Arduino Ambient Light TEMT6000 Sensor

Hardware | Arduino Ambient Light TEMT6000 Sensor

|

1. 시작하기

저번에 ambient light sensor 인 TEMT6000 센서가 잘 동작하는지, 어떻게 구동시키는지 확인해 보고 싶었습니다.




2. 소스

소스는 아래 사이트를 참고하였습니다.


http://cactus.io/hookups/sensors/light/temt6000/hookup-arduino-to-freetronics-temt6000-light-sensor-module


그냥 따라해 봤습니다.

int sensorValue;

void setup()
{
  Serial.begin(9600);  // sets the serial port to 9600
}

void loop()
{
  sensorValue = analogRead(0);       // read analog input pin 0
  Serial.println(sensorValue, DEC);  // prints the value read
  delay(100);                        // wait 100ms for next reading
}



3. 연결하기

fritzing 을 이용하여 레이아웃도 만들어 봤습니다.


- Signal : A0

- GND : GND

- VCC : 5V


실제 연결 사진입니다.




4. 결과

소스를 arduino 에 업로드 하고 확인해 봅니다.

특별히 결과치를 보여주는 창이나 output 소자가 없으므로, Arduino Sketch 툴에서 확인합니다.


- Tools > Plotter

  -- 메뉴


  -- 결과



- Tools > Serial Monitor

  -- 메뉴


  -- 결과




FIN

잘 동작하네요.

이제 뭘 하지..?


And
prev | 1 | next