It is a built-in Arduino function used to read the electrical status of a specific digital pin to check if it is receiving a HIGH or LOW signal.
What is digitalRead()?
It is the line of code that must be included at the very top of your Arduino sketch to import the library necessary for controlling a servo motor.
What is #include <Servo.h>?
It is the electrical resistance change in photoresistor’s (LDR) when exposed to direct bright light compared to complete darkness?
What is resistance drops very low in bright light and becomes very high in the dark?
It is the resistor value recommended for wiring a Push Button.
What is a 10 kΩ (10,000 Ohm) resistor?
These are pulse width duration values (in microseconds) which represent 0 degrees and 180 degrees in the attach() command to calibrate a servo motor for an accurate 180 degrees sweep and prevent hardware strain.
What are 500 microseconds (0 degrees) and 2500 microseconds (180 degrees) in myservo.attach(pin, 500, 2500)?
It is an Arduino function that reads continuous analog voltage values (ranging from 0 to 1023) from a photoresistor connected to an analog input pin.
What is analogRead()?
It is a function that outputs a Pulse Width Modulation (PWM) signal to control the color intensity of an RGB LED pin. And the exact range of integer values in its duty cycle is __________.
What is analogWrite(pin, value) using a value range from 0 to 255?
To change a servo motor's sweeping movement from fast to slow, how should you adjust the step size and the delay duration inside your control loop?
What is decreasing the step size (e.g., pos += 1) and increasing the delay duration (e.g., delay(30))?
Inside void loop(), these are the two exact C++ statements needed to store an analog reading from PHOTORESISTOR_PIN into an integer variable named luminosity and output it onto a new line in the Serial Monitor.
What are:
int luminosity = analogRead(PHOTORESISTOR_PIN);
Serial.println(luminosity);