In this assignment of designing an input device, I used one of the sensor available in our fablab.
I made a circuit which will detect a motion and Turn ON an LED.
I designed the schematic using Eagle CAD software.
And this is the design of the PCB board.
I export images of the board that I used to create a RML files.
Then I continued to generate RML file to use for milling the PCB.
After I started machining the board.
I soldered the board with the motion sensor.
I did programed it to Turn ON when a motion is detected.
int motionPin = 3;
int ledPin = 4;
void setup(){
pinMode(motionPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop(){
if (motionPin == HIGH){
digitalWrite(ledPin, HIGH);
}
else {
digitalWrite(ledPin, LOW);
}
delay(100);
}
Files used can be downloaded Here