YARPF

Raspberry Pi Logo YetAnotherRaspberryPiFanpage

6.0 - Un LDR

Plan

wiring plan

Board

bread board

Code

int pinLDR = A1;

int valSensor;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
   valSensor = analogRead(pinLDR);

   Serial.println(valSensor);

   delay(300);
}

Download

Fritzing: ldr_serial.fzz

Comments ?

blog comments powered by Disqus