timegalore
horizontal bar
horizontal bar
Infrared Camera Project - Code
Here is the code for this project - and yes it really is as simple as this; this really shows the beauty of the microcontroller - you can do great things with very little code!
#include <Servo.h>

Servo servo1;
int irPort = 0;

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("init");

  servo1.attach(10);
   servo1.write(90);
  pinMode(irPort, INPUT);


}


void loop() {


  int reading = analogRead(irPort);

  Serial.println(reading);

  if (reading > 500) {
    takePicture();
    Serial.println("SNAP!");

    delay(1000);
  }
  delay(500);
}

void takePicture() {



  servo1.write(102);
  delay(100);
   servo1.write(90);

}


		
horizontal bar