Step 3Calibration
void setup() {
pinMode(4, OUTPUT);
Serial.begin(9600);
}
void loop(){
digitalWrite(4, HIGH);
Serial.println(analogRead(0));
}
With the sketch running press Serial Monitor on the arduino window and make a note of the numbers that appear in the bottom of the window with the laser on the photocell and when it is off (ambient light).
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|





































