Arduino Prototyping Outputs #85: Servos

  Рет қаралды 353

Marc de Vinck

Marc de Vinck

4 жыл бұрын

Servos are just geared motors with a feedback loop. The trick is how you interpret the feedback and control the DC motor. Arduino makes it simple with the built-in library for servos.
Don't forget to like and subscribe if you'd like me to make more videos!
Prototyping Supplies:
• Inexpensive Arduino Compatible Kit -- amzn.to/2Dfqs5U
• A More Deluxe Starter Kit -- amzn.to/3g9nFtR
• Jumper Wire Kit - amzn.to/3f9rtK4
• Breadboard Kit - amzn.to/3hIEPib
• Amazing Perfboard -- amzn.to/30Sj6O9
• WaveShield Kit -- amzn.to/3g9vMq6
• Motor Shield Kit -- amzn.to/3hISQfL
• Adafruit Circuit Playground Kit -- amzn.to/39yBfo9
• Makers Notebook -- amzn.to/3jHOYh3
My Camera Equipment:
• Primary Camera -- amzn.to/3fewxgA
• Camera Kit -- amzn.to/3jQvaI8
• Primary Lens -- amzn.to/3jQvaI8
• Macro Probe Lens -- amzn.to/3jQvaI8
• Main Light -- amzn.to/2X1SwB6
• Secondary (RGB) Lights -- amzn.to/3jQvaI8
• Mini Lights -- amzn.to/3jQvaI8
A few other FREE sensor tutorials you might like: (I have 100's!)
• Cellular Data shield - • Arduino Prototyping Te... z
• Capacitive Sensing - • Arduino Prototyping In...
• Luminosity Sensors - • Arduino Prototyping In...
• Thermocouples - • Arduino Prototyping In...
• Sensing Vibration - • Arduino Prototyping In...
A few other sensor tutorials you might like: (I have 100's!)
• Cellular Data shield - • Arduino Prototyping Te... z
• Capacitive Sensing - • Arduino Prototyping In...
• Luminosity Sensors - • Arduino Prototyping In...
• Thermocouples - • Arduino Prototyping In...
• Sensing Vibration - • Arduino Prototyping In...
And some playlists on prototyping with Arduino:
• The Basics - • Arduino Prototyping: T...
• Inputs - • Arduino Prototyping: I...
• Outputs - Arduino Prototyping, Techniques - • Arduino Prototyping Ba...
• Complete Prototyping Series! - • Arduino Prototyping: T...
Instagram - / marcdevinck
Twitter - / devinck
My company, Panoptic Labs - www.panopticlabs.com

Пікірлер: 4
@pharaohboy8657
@pharaohboy8657 3 жыл бұрын
Thanks, I made a code that combines dimming led, potentiometer and servo (as an indicator for voltage) but the problem is tha my led turns on when brightness gets to 255 it act like digitalWrite not analogWrite............ also the servo keeping on going back and forth...the code worked perfectly when I made it for dimming led only without the servo but when I included the servo both of them began to act strange any solution?
@MarcdeVinck
@MarcdeVinck 3 жыл бұрын
Without seeing the code, it could be a couple of things. Make sure the analog read is working fine (potentiometer input), then use that value to control the LED and servo. May want to use the "map" function to get the values you want. Also, make sure you have the servo and the LED on dedicated PWM pins. (this is most likely the issue, but again without seeing the code, schematic, and actual Arduino it's hard to diagnose. Good luck! Hope that helps.
@pharaohboy8657
@pharaohboy8657 3 жыл бұрын
@@MarcdeVinck #include int Redled = 9; int Potpin = A0; int Servopin = 10; int PotVal; int Servopos; float Voltage; int Brightness; Servo Vservo; void setup() { // put your setup code here, to run once: Serial.begin(115200); pinMode(Redled, OUTPUT); pinMode(Potpin, INPUT); Vservo.attach (Servopin); } void loop() { // put your main code here, to run repeatedly: PotVal = analogRead(Potpin); Brightness = (255./1023.)*PotVal; analogWrite (Redled, Brightness); Servopos = (140./1023.)*PotVal; Vservo.write(Servopos); Voltage = (5./1023.)*PotVal; Serial.print(" Voltage = "); Serial.print(Voltage); Serial.print(" Servo angle = "); Serial.print(Servopos); Serial.print(" Brightness = "); Serial.println(Brightness); }
@pharaohboy8657
@pharaohboy8657 3 жыл бұрын
@@MarcdeVinck I did every thing you said already and I made it no line ending too so my servo won't make that issue but I still got that problem
Arduino Prototyping Outputs #86: Continuous Rotation Servos
12:03
Marc de Vinck
Рет қаралды 4,3 М.
Arduino Prototyping Techniques #95: SD Cards
7:35
Marc de Vinck
Рет қаралды 380
Этот Пёс Кое-Что Наделал 😳
00:31
Глеб Рандалайнен
Рет қаралды 2,9 МЛН
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 20 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 10 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 45 МЛН
Genius Idea! 4 Simple Ways to Make a Welding Machine for Welding at Home
30:55
Arduino Prototyping Techniques #105: ATtiny Programming
10:53
Marc de Vinck
Рет қаралды 3 М.
Arduino Prototyping Techniques #94: Memory Management
5:42
Marc de Vinck
Рет қаралды 1,1 М.
Arduino Prototyping Techniques #98: Conductive Materials
6:24
Marc de Vinck
Рет қаралды 713
Arduino Prototyping Techniques #92: BlueTooth LE (BLE)
11:10
Marc de Vinck
Рет қаралды 6 М.
Arduino Prototyping Techniques #101: iOS and Android Control
6:40
Arduino Prototyping Techniques #106: Adafruit Trinket
5:42
Marc de Vinck
Рет қаралды 2,5 М.
Козы Едят Траву за Деньги
0:31
РЕТАРД
Рет қаралды 2,3 МЛН
ПРОСТОЙ ТОРТИК
0:17
KINO KAIF
Рет қаралды 3,3 МЛН
КАК ЗАЩИТИТЬСЯ ОТ ГРАБИТЕЛЯ👜
0:43
MEXANIK_CHANNEL
Рет қаралды 2,6 МЛН
коллекционировали попрыгунчики?😭
0:59
Прогулка под водой #shorts
0:19
Story Time
Рет қаралды 3,8 МЛН