Creative Technology
Creative Technology
A control interface is a medium through which users interact with and manage systems,
devices, or applications. It includes the design, layout, and functionality that allow users to input
commands, monitor outputs, and adjust settings.
Key Components
Status indicators are visual or auditory signals that convey the current state or condition of a
system, device, or application. They help users quickly understand the operational status,
performance, or alerts associated with a system.
Key Components
Actuators are devices that convert energy into mechanical motion. They play a crucial role in
various systems and applications by physically moving or controlling mechanisms.
In this experiment, you will learn how to control an LED using an I/O port and a button on the
Arduino Uno. The I/O port refers to the input and output pins used to read external device
outputs or send signals to control devices.
Components:
Principle:
Buttons serve as switches to control circuits. When the button is pressed, it connects or breaks
a circuit to either send or stop current flow. In this setup, when the button is pressed, pin 12 is
set HIGH, turning on the LED connected to pin 13. When the button is released, pin 12 returns
to LOW, and the LED turns off.
Schematic Diagram:
● Pin 1 of the button is connected to Pin 2, while Pin 3 connects to Pin 4. Pin 1 or Pin 2 is
then connected to Pin 3 or Pin 4.
Steps:
1. Build the circuit: Connect the components according to the schematic diagram.
2. Download and upload the code from GitHub.
3. Upload the sketch to the Arduino board.
4. Test the system: When the button is pressed, the LED will light up.
Code:
cpp
Copy
// Controlling LED by Button
void setup() {
pinMode(buttonPin, INPUT); // Set buttonPin as input
pinMode(ledPin, OUTPUT); // Set ledPin as output
}
void loop() {
buttonState = digitalRead(buttonPin); // Read button state
if (buttonState == HIGH) {
digitalWrite(ledPin, HIGH); // Turn on LED
} else {
digitalWrite(ledPin, LOW); // Turn off LED
}
}
The Servo Library provides an easy way to control servo motors in Arduino projects. In this
module, you'll control a hobby servo motor using a potentiometer and learn to sweep its position
across a 180-degree range.
Hardware Required:
● Arduino Board
● Servo Motor
● 10k ohm potentiometer
● Hook-up wires
● Capacitors
● Power supply
Servo motors vary in their power requirements. For example, the Feetech Mini Servo Motor
requires between 4.8 - 6V and consumes 5–6 mA when idle. When the motor moves, the
current draw increases, potentially reaching up to 800 mA.
Powering Considerations:
● Operating Voltage Range: Ensure the power supply matches the servo motor's
specifications.
● Idle, Running, and Stall Currents: Consider the current draw in different motor states.
● Power Supply: Use an external power supply to avoid overloading the Arduino.
Recommended Power Supply: For a 5V servo motor like the Feetech Mini Servo, a 5V, 1A AC
adapter is ideal. Avoid using USB chargers (500mA or 900mA) as they may not provide enough
current for the servo.
Capacitors for Stability: Use a 100 µF capacitor to stabilize the power supply and reduce
electrical noise.
Circuit:
● Servo: Connect the power, ground, and signal wires to the appropriate pins.
● Potentiometer: Connect the outer pins to 5V and GND, and the middle pin to A0.
● Code Example for Knob Control:
cpp
Copy
#include <Servo.h>
Servo myservo;
int potpin = 0;
int val;
void setup() {
myservo.attach(9);
}
void loop() {
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 180);
myservo.write(val);
delay(15);
}
Servo myservo;
int pos = 0;
void setup() {
myservo.attach(9);
}
void loop() {
for (pos = 0; pos <= 180; pos++) {
myservo.write(pos);
delay(15);
}
for (pos = 180; pos >= 0; pos--) {
myservo.write(pos);
delay(15);
}
}