How to Use a PIR Sensor with Arduino: Wiring & Code for Motion-activated Projects

  Рет қаралды 30,394

Rachel De Barros

Rachel De Barros

Күн бұрын

Пікірлер: 56
@LordHolley
@LordHolley 8 ай бұрын
I love to tinker, so I bought one of those arduino project kits for my son and I to have fun with. It was such a pita to figure out. As a result, it's been collecting dust. You're really taking the mystery out of all of it, and I'm dusting it off and seeing what I can come up with right now. I'm so glad I stumbled across your channel. Thank you!
@lesliefoster9027
@lesliefoster9027 8 ай бұрын
I've just found your channel. It's fantastic. Thank you for leaving the mistakes in.❤❤❤
@RachelDeBarrosLive
@RachelDeBarrosLive 8 ай бұрын
I'm glad you found the channel! I learn the most from my mistakes 🤣
@anubin7625
@anubin7625 8 ай бұрын
This is awesome, I am actually working on an animatronic that can use this. I'm just starting out on Arduino so this is very helpful!
@RachelDeBarrosLive
@RachelDeBarrosLive 8 ай бұрын
Let me know how your animatronic project comes along! I'm doing an entire series on the PIR sensor to control servos, motors and even mp3 players!
@scubaken89
@scubaken89 8 ай бұрын
Thanks for explaining things in an easy to understand way. I look forward to the rest of this series.
@RachelDeBarrosLive
@RachelDeBarrosLive 8 ай бұрын
Glad you enjoyed it! I'll be covering how to control servos, motors, and mp3 players soon!
@scubaken89
@scubaken89 8 ай бұрын
Have you ever used ESP32? With ESPNow?
@bwselectronic
@bwselectronic 8 ай бұрын
I've got several Arduinos and haven't taken the time to learn to program them. I think this might get me doing it. I like this video format. No intimidation.
@LenProkop
@LenProkop 2 ай бұрын
I got a a Arduino Cogworth City kit from an add on Facebook.and after a few lessons I have a lot of questions that your KZbin channel has helped so much. Thanks!
@CryptoRulz
@CryptoRulz 8 ай бұрын
This is great! Watching now. you and hackmakemod are my favorite channels!
@RachelDeBarrosLive
@RachelDeBarrosLive 8 ай бұрын
Thanks for watching! Let me know if you'd like to see a specific topic covered!
@chvytom
@chvytom 8 ай бұрын
So smart and talented plus absolutely gorgeous ❤
@joeborovina4769
@joeborovina4769 8 ай бұрын
agreed!
@emmamarx9284
@emmamarx9284 2 ай бұрын
Another super great awesome video!! Learned a ton of very useful information that actually stuck! You’re a superb teacher!! Thankies ❤😊
@graemebrumfitt6668
@graemebrumfitt6668 16 күн бұрын
Rite Rachel Dudess, It took me a while to get my brackets, semicolons and layout just right but it now works great. I have put two orange LED's in a rat skeletons eyes (not a real one, it's plastic)! I want to add sound, "peekaboo I see you" said in a slow scary voice, (got it of a website) for when the kids come to get their sweets/candy! I love your presenting style quirky but absobloodylutely spot on, keep up the great vids, stay safe n well. TFS, GB :)
@SailAway33
@SailAway33 8 ай бұрын
Love your attitude. And the way you presented the material. Keep up the good work.
@behemoth3562
@behemoth3562 8 ай бұрын
Love the info and how you explain. Simple for me to understand. I’d also like to see how to make random blinking eyes on a prop/mask animatronic. I’ve seen it on instagram but no clear explanation on how they did it on a mask. Thank you 🙏
@RachelDeBarrosLive
@RachelDeBarrosLive 8 ай бұрын
That's a great idea for a future tutorial! For the mask project, one thing you may want to check out is flickering LEDs. They come in red, green, yellow and a variety of different colors. No coding is needed. You just include a resistor and power them with a battery and they flicker randomly on their own. Of course you can program specific patterns with Arduino and trigger them with a PIR sensor too!
@behemoth3562
@behemoth3562 8 ай бұрын
@@RachelDeBarrosLive that’s a cool idea too with blinking LeD’s! But to be more specific; sorry if I wasn’t clear 🙏: blinking eye lids where it looks like the character is shutting and opening eyes. I saw someone build it with a resin printed helmet shell to wear. Which I wonder how they stuck such small components to do that. Thank you so much again!
@proyectostogo1462
@proyectostogo1462 8 ай бұрын
You are the best 🎉🎉
@RachelDeBarrosLive
@RachelDeBarrosLive 8 ай бұрын
Thanks! 🤩
@jeremydobb4524
@jeremydobb4524 5 ай бұрын
Such an informative and easy to watch channel! Love it! Thanks for sharing!
@JamesConway-s9q
@JamesConway-s9q 14 күн бұрын
Another great video and very beautiful, I just love your channel. From Jim 😊❤
@zk_6312
@zk_6312 7 ай бұрын
Great video. I have been having trouble with my PIR sensor. Either the LED stays on too long or off too long. I try some of your code to see what went wrong. I tried your code and it works better than anyone elses code. Great job. One thing though in your 3rd example, the one using the led, you forgot to setup the ledPin as OUTPUT. Not a big deal really, easy to fix, but I thought you might want to know.
@JDude-uj3lk
@JDude-uj3lk 6 ай бұрын
Rachel, have you ever used hall effect sensors to control a dc motor for movement of a prop to a specific location?
@louiepauda6275
@louiepauda6275 8 ай бұрын
High! Hello, there! Hopefully, all is well! Love you intrest in electronics probably vary technical! Goodluck with all those components!
@kabandajamir9844
@kabandajamir9844 8 ай бұрын
The world's best Queen teacher thanks
@donnadimitrova8268
@donnadimitrova8268 5 ай бұрын
Thank you for the great video! I have one question: What if I want the 3 second sound to repeat, if motion is still present? Meaning, if a person stays for longer than a few seconds the same sound bite loops. Right now, I see the option sensor is detecting that motion is still present, but the MP3 player automatically turns off after the 3 seconds of the sound bite as played.
@brucemilyko8549
@brucemilyko8549 7 ай бұрын
Just found your Chanel. It's Great! I'm curious, why aren't you using the latest Arduino IDE(2.3.2)?
@RachelDeBarrosLive
@RachelDeBarrosLive 7 ай бұрын
The computer I live stream from isn't the one I usually use for coding so the IDE is waaay outdated. It's on my to-do list to update it so hopefully you'll see the latest one in future videos 👍
@stevedunbar1400
@stevedunbar1400 Ай бұрын
Could you sugest a kit with all the motion sensor stuff for my halloween things mostly spirit props . Awsome vids watching and lesrning
@BattleForEden
@BattleForEden 6 ай бұрын
Wow! So cool! The world is coming aliiiiiiivvvveee
@keneflucas937
@keneflucas937 6 ай бұрын
Hello. I was looking to purchase some of those motion sensors for smart home applications. In the description it says the manufacturer did not install a photodiode. A different one (but looks exactly the same) says photoresistor. Are they the same thing? How will i know if i need to install one? What are the necessary connections for integration?
@DBB-KE5DUO
@DBB-KE5DUO 8 ай бұрын
This stream is reminding me I have an acrylic protected motion detector porch light to finish! 😂😂🤣😢😢😭😭😭
@RachelDeBarrosLive
@RachelDeBarrosLive 8 ай бұрын
Noooo - not more projects!!! 🤣
@DBB-KE5DUO
@DBB-KE5DUO 8 ай бұрын
@@RachelDeBarrosLive - Yaaasss! I'll finish one of my many projects someday! 🤣😂🤣😂
@HumBirdBell
@HumBirdBell 3 ай бұрын
Rachel …Nice video …informative..thanks….juddeye
@michaelgarcia5493
@michaelgarcia5493 7 ай бұрын
How that's awsome vid it sounds cool if only I new how to code 🤘🏽😃🤘🏽
@LonnonFoster
@LonnonFoster 8 ай бұрын
Great to see that I'm not the only one who does that cringe thing when the sketch is compiling. I'm all "no whammies, no whammies" every single time.
@brianzimmer1632
@brianzimmer1632 8 ай бұрын
Gorgeous and Geeky! LOVE LOVE LOVE !!!!
@NewAcc02-ok5df
@NewAcc02-ok5df 6 ай бұрын
Can Arduino simulate keyboard presses? Say I want it to press Crtl+Alt+Delete when the PIR detects motion, is there a command for that?
@DIYElectronicCircuits
@DIYElectronicCircuits 2 ай бұрын
cool🎉
@RachelDeBarrosLive
@RachelDeBarrosLive 2 ай бұрын
Thanks! 🥳
@SummersideDiver
@SummersideDiver 7 ай бұрын
Awesome presentation style. Informative and engaging way to do these tutorials. Thanks
@RachelDeBarrosLive
@RachelDeBarrosLive 7 ай бұрын
Glad you like them!
@shaunewing8973
@shaunewing8973 8 ай бұрын
your stunning . and great informative videos. 😄😍
@Xhilong
@Xhilong 7 ай бұрын
Is there a way for the Motion Sensor / Arduino to play a mp3 file when it detects motion.
@RachelDeBarrosLive
@RachelDeBarrosLive 7 ай бұрын
It just so happens that I'm about to release another video on just that in about a week or 2! 🥳
@TheAnikatodd
@TheAnikatodd 2 ай бұрын
Hello, a quick question I would like to know if anyone has an answer for. I can't get the DFPlayer LED to even light up. I have the wiring precisely the same and a formatted SD card. Does anyone else experience this issue? Advice?
@alzamamulhaque1613
@alzamamulhaque1613 8 ай бұрын
Please teach me, or help me I have a lot of projects that need some help from experts like you.
@AbenezerTsegaw-r7x
@AbenezerTsegaw-r7x 3 ай бұрын
Pleas give me writhing mation program file pleas
@jimedgar6789
@jimedgar6789 8 ай бұрын
INTRUDER ALERT! Owld Skew
@GoatZilla
@GoatZilla 8 ай бұрын
lol kekeke. perhaps next step would be to switch to an ESP so u can go wireless. to start off, the most basic example would be to have the LED follow the inverse of the PIR GPIO. i.e. (pseudocode incoming) digitalWrite(ledPin, ~digitalRead(PIRPin)). That's because the PIR sensors will hold the line high for, what, a second or something, which is long enough to for an eyeball to see the LED, and you don't run into any of your issues. Less is more sometimes. second, you should just avoid delays. use rollover safe millis() math instead. Basically almost any time you use delay(), you're probably doing something wrong. This is an unfortunate deficiency in the Arduino ecosystem -- no notion of a "scheduler". But basically once you structure the code that way, it's easier to start doing stuff like your fade and other events.
How to Use Arduino Interrupts The Easy Way
33:28
Rachel De Barros
Рет қаралды 89 М.
Motion-activated Sound Effects with Arduino, PIR Sensor & MP3 Player
25:26
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 71 МЛН
Motorbike Smashes Into Porsche! 😱
00:15
Caters Clips
Рет қаралды 23 МЛН
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 11 МЛН
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
How to Use a Joystick with Arduino: Wiring and Basic Controls
13:44
Rachel De Barros
Рет қаралды 13 М.
Effective Ways To Detect People With Common Sensors
7:43
Core Electronics
Рет қаралды 86 М.
PIR motion detector - HOW IT WORKS (easy to understand)
11:54
mrmattandmrchay
Рет қаралды 32 М.
How to Use Millis to Master Arduino Multi-tasking
50:17
Rachel De Barros
Рет қаралды 58 М.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
How to use an RC Transmitter with Arduino (Lesson #18)
13:43
Science Buddies
Рет қаралды 39 М.
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 71 МЛН