MENU

Fun & Interesting

Add Realistic Slow Motion to Servo Point Motors

Little Wicket Railway 19,698 3 years ago
Video Not Working? Fix It Now

I prefer servo point motors because they're cheap and reliable compared with other methods. Another benefit of servos is that with a small amount of code they can be slowed down to look more realistic. In this video we look at two methods for coding realistic slow motion into a servo point motor. The first method uses the delay() function and does the job, but can cause problems elsewhere. The second method using the millis() function is slightly more complicated to setup, but allows everything to happen at the same time without delay. If you want to know more then this guide from Adafruit is really helpful: https://learn.adafruit.com/multi-tasking-the-arduino-part-1/ditch-the-delay These methods can be used to slow down any servo motor or even to add fade to LEDs connected to a PCA9685. If you'd like to give this a go yourself then all the kit can be found in my Amazon shop or via the affiliate links below. Note that these are affiliate links which means the channel receives a small percentage of the sale which goes to support production, but don't worry you still get the same great price. Thanks for your support. https://www.amazon.co.uk/shop/littlewicketrailway Arduino Nano: https://amzn.to/3tSFpBb SG90 Servos: https://amzn.to/2N3uzY4 Servo Driver Board (PCA9685): https://amzn.to/2NoTKo3 IR Sensors: https://amzn.to/2LQJmVF LEDs: https://amzn.to/3rSViFz Chapters: 00:00 Introduction 01:25 Setup 01:58 For Loops 03:17 Delay Function 03:58 A Problem 06:29 Mr Nano Demonstrates 07:36 Millis Function to the Rescue 09:31 Improved Code 10:36 Summary 11:19 Reward for Making to the End

Comment