Slicer Discord
Motion sensing night light – 3D printable model from Thingiverse Thingiverse

Motion sensing night light

1 Downloads
4 Likes
0 Makes
Go to Model
Motion sensing night light to light of bathroom

Arduino code:

//basic night light
// A0 pin for LDR
// A1 pin for motion sensor
// LED1 led output on pin 9
// LED2 led output on pin 10
int LED1 = 9;
int LED2 = 10;

void setup () {
// set up I/O
pinMode(A0,INPUT);
pinMode(A1,INPUT);
pinMode(LED1,OUTPUT);
pinMode(LED2,OUTPUT);

// for serial monitor - watch LRD and motion sensor values

Serial.begin(9600);

}

void loop(){
// read sensors
int lightValue = analogRead(A0);
int motionValue = analogRead(A1);
// set lights to off,for start up and after lights are turned on
// with motion
digitalWrite(LED1,LOW);
digitalWrite(LED2,LOW);
Serial.println("light");
Serial.print(lightValue);
// if it is dark then look for motion
if(lightValue>50)
{
// look for motion
if(motionValue>100)

{
// if motion, then turn on lights
digitalWrite(LED1,HIGH);
digitalWrite(LED2,HIGH);
delay(120000);
}
els
Source
Thingiverse
What you need to print this: Beginner Low confidence
Single piece
Supports 1/3
Assembly 0/3
Settings 1/3
Bed size 0/3
Post-process 0/3
Printer
FDM / FFF
File format
STL
Material
TPU
Software
Cura, PrusaSlicer, or similar
No ratings yet
No comments yet – be the first!

Similar Models

6 Suggestions
Feed Blog Slicer Cost Calculator Image Search Submit Kontakt Discord ☕ Buy me a coffee
DE EN FR ES IT NL

Add to Collection