Thursday, 19 January 2012

Setting up the light sensor

So it begins with a bit of arduino serial :
void setup (){
  Serial.begin (9600); <-- Standard setup serial
  }
void loop () {
  Serial.println (analogRead(0));  
<-- Read analog port 0 (light sensor)
  }



Then connect up the wires to arduino and bread board

Light sensor set up

No comments:

Post a Comment