Arduino UNO R4 Lesson11 - Servo Motor | Single-Axis Solar Tracker using Photoresistors

preview_player
Показать описание
This is the 11th lesson of the Arduino UNO R4 - Ultimate Training series. Joed Goh discusses Servo Motors and Building a Single-Axis Solar Tracker using photoresistors. He also shows how to control a servo motor using 2 different Servo libraries. Then, he explains how to position a servo motor using a potentiometer and a photoresistor. At the end of this lesson, you should be able to create a simple solar tracker using two photoresistors simulating east and west locations and a servo motor to position the solar panel.
=======================================================================
---------------------------------------------------------- Where to buy? ----------------------------------------------------
SunFounder Official Website:

SunFounder Ultimate Sensor Kit with Original Arduino Uno R4 Minima

SunFounder 3 in 1 Ultimate Starter Kit with Original Arduino Uno R4 Minima

SunFounder Elite Explorer Kit with Original Arduino Uno R4 WiFi

Amazon US
SunFounder Ultimate Sensor Kit with Original Arduino Uno R4 Minima -
SunFounder Ultimate Starter Kit with Original Arduino Uno R4 Minima -

==========================================================================

------------------------------------------------------------------------------------------------------------------
TABLE OF CONTENTS
00:00 Introduction
01:23 Materials
02:05 Servo Motor
02:36 Servo Motor Connection
04:35 Installing the Servo Library
09:56 The Sweep Sketch
11:47 Installing the PWMServo Library from GitHub
13:13 Controlling via Potentiometer
15:25 map() function
18:06 Controlling via Photoresistor (LDR)
19:00 Challenge Activity
20:49 Up Next

Arduino UNO R4 Lesson07. Arduino UNO R4 Lesson 07. Understanding Photoresistors | nested if, else-if, and for-loop

Arduino UNO R4 Lesson06. How to Read Analog Sensors? Potentiometer | Bits, Bytes, & Binary Numbers

PWMServo Library

------------------------------------------------------------------------------------------------------------------
PLAYLISTS:
Arduino UNO R4 Minima Ultimate Training Course

SunFounder Kit Product Review

Designing Database Solutions with Microsoft SQL Server 2019

Artificial Intelligence and Machine Learning Foundations

IoT Development

Android App Development in Kotlin

Embedded Systems using Arduino Uno

Data Structures and Algorithms using C#

References:

#SunFounder #arduino #potentiometer #LDR #photoresistor #servomotors #servo #solartracker
Рекомендации по теме
Комментарии
Автор

Unfortunately the code will not compile on my R4 Minima using the 'PWMServo' library (exit status 1) I've checked all the usual things (boards, ports etc) and all okay, however it will work with 'Servo' library but not smoothly, any ideas?…2 hours later…Problem solved! 🎉 I compared the ‘.CC’ & ‘.h’ files between the PWMServo library I installed via library manager on the Arduino IDE, and the same library via ‘GitHub’ and they were different in that the library from ‘GitHub’ contained components for the R4 whereas the other did not, anyway I have installed the PWMServo library from ‘GitHub’ and all is working okay for now! 😁👍🏼

Автор

Dear Joed thanks for this course. I have one question. Is it possible to give an working solution of the Challenge Activity ? Thanks a lot and a lot of succes with the next lessons. best regards Bart

bartstevens
Автор

I really enjoy your teaching style. I have myself and my students using these tutorials for learning how to use sensors, LEDs, motors, sound and pneumatics for animatronics. You do an amazing job as a teacher. Thank you so much.

Platttraining
Автор

Good morning Joed, Sorry to bother you, however I tried to download this file several times and I still got an error "exit status 1" herewith is the error showing on my IDE note: candidate: bool PwmOut::begin(float, float)
bool begin(float freq_hz, float duty_perc);"

chitobalazo
Автор

Thank you Jeod as per your email I uninstall 1.0.1 and use 1.0.5 and it it work. Thank you very much

chitobalazo
Автор

I'm trying to control multiple servos or ESCs using the PWMServo.h library but as soon as I attach a second servo or ESC the program doesn't work. Anyone else experience this?

adamspencerny
Автор

Finalmente è arrivata una nuova lezione... ❤❤❤ I corsi più belli che ho visto fino ad adesso. Spiegazioni perfette e chiare. 😊

michelealbanese
Автор

1st like, 1st view and 1st comment🎉🎉🎉

sgnj
Автор

Again I am requesting, How so I contact you, I need some help with esp32 codes . Your new subscriber from Australia

shijumax
Автор

I get the Servo library to work, but not the PWMServo. tried your download from Google drive but still not working. Any ideas what is wrong?. Get error PWMServo.h: no such directory.
in the PWMServo.cpp in section Arduino R4 it is looking for #include <pwm.h>, can't find this library, is this the problem

alistaircook