Это видео недоступно.
Сожалеем об этом.
Arduino Tutorial 36: Understanding How to Use Tilt Switches in Your Projects
HTML-код
- Опубликовано: 17 авг 2024
- You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
/ paulmcwhorter
Tilt switches are simple and useful devices which allow you to detect whether your project or device has turned over. This would be useful to incorporate in various robotics projects to allow your system to know if it has turned over or gotten inverted. This tutorial explains these simple sensors and how to use them.
You can get the kit I am using for this series at the following link:
amzn.to/2I7N4Ek
Follow these lessons on our WEB site:
toptechboy.com...
[Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. This means if you visit the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.]
#Arduino
I am electrical engineer, this is the best tutorials I have ever seen!
GABRIELLA! I'm currently on day 3 of going through these tutorials and I have done them all the way through including the homework in between. This stuff works!
Gabriella!
you are incredible fast! congratulations, you are a really fast
Paul, I also am an Engineer but, I went to school in the age of vacuum tubes. I was the RTU Engineer at my local electric utility. Your videos are very professional informative. I do watch every lesson to the end. I also spent 7 years in the Ivory Coast as a Peace Corps volunteer. Thanks for the wonderful classes. I do really appreciate the insight. BTW, Happy Birthday and enjoy your time with Gabrella.
GABRIELLA! I'm watching all of your Arduino tutorial videos in order and always to the end. I don't do every assignment, but when learning a new important point, I do the assignment to reinforce the learning. You are a Master Teacher and your teaching style is the best I have ever experienced. I have completely understood every lesson. I especially like the in depth explanations of the combination of software, hardware, and physics. Well done, sir.
Gabriella. I have been watching till the end every single one since the beginning. You have been a godsend good sir. I highly appreciate all the effort you put into these tutorials, it is not lost on us. You are a truly exceptional teacher and a delight to watch and learn from.
Hi Paul,
Gabriella !!
Following your whole series of newer Arduino tutorials, just finished No 36 (tilt Switch).
I always watch them to the end, I have about a 50% success rate with the assignments.
You have got the mix of practical and theory just about right in my opinion.
Hello again Paul. Now that I have completed the project and watched the end of the lecture it is time to mention Gabriella. I have watched all of your videos, some more than once.
I have completed all the projects, got many of them right, made mistakes on others, but learned something and had fun with all of them.
I see that you have many other courses, enough to keep me busy for a long time. It is hard to imagine all the work it took to produce them.
I really like the spontaneous feel, like one is working along with you at the same time, and your sense of humor is spectacular. Now on to lesson 38, 39, …….
Tony
I am a retired Electronic Repair and did my course back the 70's with AWA Corp and Industrial Electronics . I am enjoying keeping my mind active and re learning things. I closed down my Repair Business back in 2008 and since then I have lost touched with everything electronics and all the latest innovations. Gabriella was happy to catch the plane to come and see you. And a very Happy Birthday!!
"Gabriella !"
Awesome videos by the way! After only a few days of owning the Elegoo kit, I made it to lesson 36 and was able to do the homework, and it worked! I'm super happy :) Thank you!
Awwww Gabriella looks cute
Happy birthday Paul!
I just made a robot the other day that follows light. Nope, I did not copy anyone’s code. I did it myself. Thank you
Done the assignment by myself after pausing the video. Got it right in the first shot itself. Really had fun!!!😃😃😄
Gabriella! And yes, I was able to figure out how to set up and program the LEDs with the tilt switch without having to simply copy what you were doing... for once, haha! Hopefully that means I'm finally figuring this stuff out. This was a great tutorial, and I'm looking forward to watching the next one.
String birthday = "Happy Birthday!";
String granddaughter = "Gabriella";
void setup {
serial.begin (9600);
}
void loop {
if (11/12 = your birthday && granddaughter=coming home) {
serial.print(birthday);
serial.print("clue word");
serial.println(granddaughter);
}
hahahah this is so cute
haha, I second that!
Great video!
That's wrong, it should be == because it's conditional
Hey Mr.Paul! Another glorious video tutorial. I am very grateful for the hard work that you put into these amazing tutorials. Keep up the good work! Gabriella looks excited!
-STILL not Carole, just her son.
I am a programmer and engineer, so have very little patience for these things - but the wife had to point out that you and I are both Scorpios. So happy birthday, great teacher, and know that I will follow your tutorials always to the end, with coffee in hand.
I showed my son the green on tilt red project and he was amazed. I explained that it was as simple as two connections and a little ball. I even unplugged it and rattled the ball inside. He then suggested a magnet and sure enough, the magnet doesn't even have to touch it. It simply gets close and the lights change color. Gabriella!
Really wish I had you as a teacher when i was in school, I might have just paid more attention.
i figured out the error and homework by myself, i also used the mini breadboard for the tilt switch so i could move it with out reducing the visibility of the leds. gravrela
Gabriellaaaa!!! Not only did I watch all your videos from start to end, I have watched some videos twice. You are a good teacher.
Thank you so much!!
Hi Paul. I’m just another old dog trying to learn some new tricks. You are a great teacher. Thanks for your generosity of spirit.
Glad to help
Belated “Happy Birthday”! Another great tutorial. Gabriella.
Made it to the end ans saw "Gabriella"; see much more than 3 minutes worth.
GABRIELLA! Thank you engineer. I have an electronics engineering degree. Thank you for giving this free tutorial. It was one of the best tutorials I've watched.
Happy Birthday. God bless Gavrialla. I do not know how many times I watch your video to understand your project. Every time a new thing comes out to me. Your debugging process is wonderful. It helps students where they are made mistake. Today I learn why I put TiltVal in place of TiltPin into serial.println because we already have tiltPin=2. I know it easy for everyone to undetstand but it is really difficult in past to me but today my legendary teacher Paul all clear to me. Thanks for everything Paul. God bless you.
i use this tilt switch with a 555 timer to light an led and installed in a house shoe so I can see at night if I have to get up.
the 3 dislikes are the people who dont like coding
What is there to dislike? I don't get it.
All the info you put into your videos; does NOT go to waste with this student
3 years late but Happy Birthday!!
Also Gabriella looks like an angel.
I thing you are the sweetest and coolest grandpa that everybody would want
Today's homework was much easier to complete without instruction. And it was your birthday! Lucky man to have such a beautiful grand-daughter! Thanks for another great lesson.
This was fun. I taught this to my 4 boys and wife. It was fun letting them hold the tilt switch. I asked them what they felt. It was fun to see them enjoy learning. 4, 6, 8, and 10 are the ages of my boys. This is so wonderful to take the code and to the physical world. It is fun thinking about what projects we can do with all that you have taught me. My boys have ideas of what we can do together. Look forward to paying it forward to my boys and may a school someday!
We started with an experiment from the Feynman Physics lectures/exercises this morning and then did this.
Wow -- how blessed I am to study Physics with Feynman and Computer Science with you Mr. McWhorter!!!
Great that you are making this investment in your boys. Well done!
Gabriella. I recommend all of your video tutorials to anyone who asks me where to learn arduino, pi, fusion360, or python.
At the start of the video I paused and built the entire thing and got it to work by myself!
I also used else instead of 2 if's on this. I jump back into your lessons to check things as I'm doing my homework (sometimes for only a few minutes, as you say), because I started your most excellent tutorials only 2 months ago, following my 80th birthday Arduino gift, and my brain velocity is much lower than it was 60 years ago! Also in this project i stuck my tilt switch to my stepper motor cardboard arrow (motor fixed vertically), connected using a pair of female/male wires. It switches the red/green LED's, but also controls the stepper motor direction, clock/anticlockwise, like a wiper blade. Thanks for your really excellent lessons Mr Paul. I used to live in Addis Ababa, love Africa and its wonderful people! Hi Gabriella !!
I watched to the end and did my own coding!! Thanks for your help. I hope you had a great time with Gabriella as she was coming to see you. Grandkids are great!!!!!
Thanks, Paul. My Maths is actually non-existent so I'm very slow at working these things out. But trying a new thing in my late 60's gives me a new challenge in life. Welcome to Africa. I see you've now re-located. Very Brave at your age, but obviously Higher Hands are leading you. And Gabriella is a sweetie. So Cute.
Hi Gabriella, Mr. Paul has taught me a lot and am very grateful so give him lots more applause
Gabriella, I am very appreciative of your easy to follow and understand lessons. I'm in my seventies and doing Arduino for the first time.
Wonderful!
Gabriella! You are the best teacher I have ever had, I'm glad you made this series
Wow, thank you!
Funny enough, I wrote my own code before looking at yours, but neither mine nor your code seemed to work, so I was just about to get ready to take apart my circuit. Then I realized that I had never grounded my red LED. Now, it works like a charm!
Gabriella.
Been watching all your videos beginning to end at work on my breaks. Then when I have time at home, I redo them again step by step. Great videos sir! Learning so much.
Many Happy Returns Paul, made it to the end AND made it work! Granddaughters are precious, enjoy your time with Gabriella.
Gabriella..... took a few months off due to other commitments. But was able to easily do this on my own. Really like these videos. I am finally understanding how all this works.
I really like the homework. It forces me to recall things that I have learned and figure it out on my own. I really enjoy the way you do these lessons! Great work!
Hey Paul, thank you for another lesson (Gavriella)! I did this one before watching you doing it. Below is the code I ended up having. Nice way to simplify the if statements here - since we read 0 and 1 already we can incorporate these values in the digitalWrite statements:
int greenPin = 8;
int redPin = 9;
int tiltPin = 53;
void setup() {
pinMode(greenPin, OUTPUT);
pinMode(redPin, OUTPUT);
pinMode(tiltPin, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
bool tiltVal = digitalRead(tiltPin);
digitalWrite(redPin, tiltVal);
digitalWrite(greenPin, !tiltVal);
}
Seeing the children healthy and Happy is the best birthday gift ever! Happy Birthday and Gabriella looks so happy.
Gabriella!! I'm a computer science student who has a passion for building things with my hands, your tutorials have been awesome and I'm really thankful for this series!
Gabriella!
I have noticed there is a small breadboard in the set which I have used as the tilting senor. The rest of the circuit I have implemented on the big one. Makes the sensor easier to play with.
Gavriella. Struggled with the homework for a bit until I realized I used the wrong brackets. Worked great after that lol. Happy very belated birthday Paul, hope you had a great day.
Gabriella! Was able to do the homework on my own. Just proof of how awesome of a teacher you are! Keep it up Paul!!
Great job!
GAVRIELLA ....
This Homework was cleared fast
😀 thanks Paul. I have been watching all your videos to the end. Most times I replay as many times as possible to understand the concepts. Especially the ''PUSH BUTTON AS TOGGLE'' lesson.😄
Thank you for the great series!
The deliberate mistake was that we were reading tiltPin, instead of tiltVal!
Happy birthday! Your granddaughter Gabriella is adorable! I was so excited to do the homework by myself. Thank you so much for these videos.
GABRIELLA is precious!! Truly a gift from God!! :-) I can't believe average view time of your videos is only 3 minutes!! WOW!! I find myself anxious for more!! Can't wait to start the next lesson! HAPPY BIRTHDAY PAUL!! (late by a few years sorry)
Don't understand why people wouldn't finish the videos, but I like to understand how things work. Make it to the end every time, I thought that was the point. Did the homework on my own the same way you did, I think I'm starting to get this stuff. "Gabriella". Thanks for the videos Paul!
Gabriella looks like a bundle of joy! I saw the mistake as you were typing it. Still need to wrap my head around the toggle switch logic, but was able to do the homework just fine. Thanks for the effort you give in sharing this knowledge. We are truly blessed to be able to learn this because of beautiful people like yourself!
Gabriella. Thanks for putting this series together. I'm an Assistive Technologist for students with disabilities and I'm just starting down the Auduino path so I can make more customized and sensitive switches for the students I work with.
GABRIELLA, I just want to say THANK YOU for all your videos. Yes, I watch them to the end, and then go back and pice-meal them into the code project i'm working on. Oh... and no, I don't do my homework. I take a coffe break with you. Thanks again for all that you do.
Thank you very much, Paul. That is because you are printing the pin not the value you just read. Thank you for your trick. You are a wonderful instructor.
Happy Birthday Paul!! --Gabriella--
As soon as I heard "pause this video" I immediately went ahead and did the homework.
Hi Paul, I think your lessons are great. I have had some programming in C about 25 years ago and it seems to be like riding a bike, most of it came back. Thanks for the videos, having a great time with my Arduino.
Great to hear!
I was able to go back and finish the assignment on my own without watching the whole video. It worked, and now that i have watched to the end....Gabriella❤❤
Excellent!
Yes, I got to the end and completed the homework before watching how you did it. Am enjoying all your videos. Gabrielle.
Gavriella. I don't have a tilt switch in my kit but I am listening along to the video.
Gabriella! I watch all your lessons to the end. Don't want to miss a second of them.
I'm watching Paul!. Enjoying the series so far. I also made it to the end, as I have with all your videos.
I always do the homework Paul. And, you're right, it really does help. I coded mine to take three readings 500ms apart. You can shake it all day without triggering the red LED, but one second after it tips, boom. Red Light!
Thanks Paul, I enjoyed this project and watched until the end and was also able to program the homework myself.
Gabriella looks very excited to go see her grandpa!😀
Paul, I did the mistake of the equal, instead of the equal equal. I was breaking my head to understand why it wasnt working, and then I eventually understood it. I hope that eventually I learned it. GABRIELLAAA!!
Gabriella, homework completed. Added a delay in the loop to avoid intermittent flickering in the closed position.
Gramps Paul must be so proud!!
Gabriella! and that's for every video so far. This series is absolutely brilliant!
Nice that Gabriella could come and visit you! I am sure you enjoyed the visit! and Happy Belated Birthday as I realize the time delay of making the video and us viewing it.
Thanks so much! 😊
Hi Gabriella, I actually did the project by myself before you gave the homework as when you started the video and showed the tilt switch and the two LED’s I knew exactly where this was going 😂
Thanks Paul, your tutorials are the right length, and you explain so well!! I did the HW, and it worked perfect because your prior lessons are very clear and building on previous stuff that has a nice flow to it. You have a beautiful grand-daughter Gabriella. God Bless you and your family.
And may God richly bless you as well.
happy birthday Mr. McWhorter, you absolute legend!
Happy belated birthday, Paul. You probably won’t see this but I really enjoy your tutorials. I wish I would have found them sooner. Who knows, maybe I would have been so much further ahead by now if I would have. Two thumbs up, sir.
Glad you like them!
Gabriella. Love your explanation and coding, Paul. I’m Jeff from Australia
"Gavriella".
Off course I always follow your videos to the end. Well, I did my homework and I did it well after two mistakes ("Red" instead of 1, "Green" instead of 0). Always fun to follow your Lessons.
you are one of the greatest you tubers for electronics education. (Gabriela)
Gabriella. I watch all tutorials to the end. They are so informative and easy to understand. Happy birthday.
ive been enjoying your tutorials. they are among the most comprehensive ive seen on RUclips. ive been able to complete most of a pet project with your series.
Gabriella !!
Yes, I go from start-to-finish on each video in succession and I enjoy them! And YES, each and every assignment.
Wonderful!
Gabriella!! I am 3 years and change in the future wishing you a very late happy birthday PAUL! haha. Also, I was able to do the homework on my own the only thing different I just put the else statement instead of another if statement. Great video once again !!
Gabriela
I watch your videos all times to the end thank you for your time
Love this course! And yes did my homework and watch til the end. I bet Gabriella is having her own Arduino kit by now. Cheers!
I know i miss it on 2019 but ur 2021 birthday will be after 2 months so HAPPY BIRTHDAY!! Gabriella !! and have watched all ur tutorials from start to finish and i will keep watch till last one
Happy Birthday Mr Paul, seeing the video 2 years after you posted it and coincidentally on your birthday date 🙂. You are an excellent mentor so can't miss any part of the video and yes saw Gabriella !!!!
This was a great problem which I solved with using Your Tutorials and, of course an Arduino kit. A motor driven arm rotate starting at -10 degrees all the way around 360 degrees to +10 degrees and then stop. Of course after it stops you will need to rotate it back to the -10 degree start position. Tilt switch are not used due to repeatability problems. We also couldn't use limit switches. If you would like to know my solution just ask. Only tutorials 1 thru 17 were needed.
I'm happy to admit that going through these lessons that I have printed the pin rather than val many, MANY times.
I always make it to the end even if I have the video two or three times (Your benefit Paul) and I worked out the fault that was in there before you showed it! Im so pleased with myself! GiddyUp Gabrielle!! Thanks Paul.
Thanks, post-Happy B-day! As a fun challenge I made the code so that it allowed vibration using two variables. The first was an average of 30 shorts or open circuits using a for loop. This produced either an int of one, or a float less than one. The other was produced with an if statement that counted the number of consecutive averaged ones (shorted states/cycles). So if 20 consecutive averaged ones were counted then it would allow the shorted state of one to pass through the if statement and trigger the light (if (ave=1 && count > 20) etc...). I based this by vigorously shaking it, which usually triggered 4-15 consecutive averaged ones. If I tipped it over, then it instantly (to the natural eyes) counts 20+ consecutive averaged ones (or shorts), and it gets triggered.
Gabriella! Not a single second is wasted by skipping it. I have very limited time during the day because of work+parenting, but I am here to learn, not to memorise some stuff for a day or two. Hoping one day I'll tell/show someone what I learned, so I gotta be prepared :) Thanks a lot
Tilt Switch working, think I'm finally getting to grips with this coding. Happy Days.
I Know I'm late to the class, but really enjoying learning new skills. Thank again.
Nice work!
Thanks Paul always watch to the end, no problem with homework, the difference was I used the else statement rather than second If statement. Looking forward to future lessons.
Hi Paul, and happy birthday. Hope Gabriella comes to visit! And yes, I watch all your excellent tutorials to the end (36 so far!)
Hi to GABRIELLA. Still here at the end. Easy homework this lesson, just using a different form of input switch from earlier lessons. Love your methodology! Have done all the homework lessons to mostly success.
Wonderful!
Gabriela. I watched until the end. I was able to complete the assessment myself, I think it was easy as I had watched all your videos previously.
Gabriella! I have watched every previous arduino tutorial in this series as well.
Gabriella!!
I'm very glad with this exercise because it was not very difficult, so I made it exactly as you did explained it later in de video.
I'm following the complete Arduino tutorials because they are so well made and you are such a great teacher. In fact I watch the most tutorials several times to understand what is happening. And I do all the homework but not always with succes, some are very difficult (like the steppermotor tutorial).
Again, thank you very much for this great series of Arduino tutorials!!
Boom, homework done. Gabriella looks very happy to be coming to see you.