This the multi-page printable view of this section. Click here to print.
Output
- 1: LED
- 2: Buzzer
- 3: Vibration Motor
- 4: Relay
- 5: Servo
1 - LED
Connection scheme
Scheme made with Fritzing.
Functions
On
On State
Switches the component on.
void function_0_led(){
digitalWrite(pin_0_led, HIGH);
function_0_led();
}
digitalWrite(pin_0_led, HIGH);
void function_0_led(){
digitalWrite(pin_0_led, HIGH);
state = 1;
}
Off
Off State
Switches the component off.
void function_0_led(){
digitalWrite(pin_0_led, LOW);
function_0_led();
}
digitalWrite(pin_0_led, LOW);
void function_0_led(){
digitalWrite(pin_0_led, LOW);
state = 1;
}
2 - Buzzer
Connection scheme
Scheme made with Fritzing.
Functions
On
On State
Switches the component on.
void function_0_buzzer(){
digitalWrite(pin_0_buzzer, HIGH);
function_0_buzzer();
}
digitalWrite(pin_0_buzzer, HIGH);
void function_0_buzzer(){
digitalWrite(pin_0_buzzer, HIGH);
state = 1;
}
Off
Off State
Switches the component off.
void function_0_buzzer(){
digitalWrite(pin_0_buzzer, LOW);
function_0_buzzer();
}
digitalWrite(pin_0_buzzer, LOW);
void function_0_buzzer(){
digitalWrite(pin_0_buzzer, LOW);
state = 1;
}
3 - Vibration Motor
Connection scheme
Scheme made with Fritzing.
Functions
On
On State
Switches the component on.
void function_0_vibrationMotor(){
digitalWrite(pin_0_vibrationMotor, HIGH);
function_0_vibrationMotor();
}
digitalWrite(pin_0_vibrationMotor, HIGH);
void function_0_vibrationMotor(){
digitalWrite(pin_0_vibrationMotor, HIGH);
state = 1;
}
Off
Off State
Switches the component off.
void function_0_vibrationMotor(){
digitalWrite(pin_0_vibrationMotor, LOW);
function_0_vibrationMotor();
}
digitalWrite(pin_0_vibrationMotor, LOW);
void function_0_vibrationMotor(){
digitalWrite(pin_0_vibrationMotor, LOW);
state = 1;
}
4 - Relay
Connection scheme
Scheme made with Fritzing.
Functions
On
On State
Switches the component on.
void function_0_relay(){
digitalWrite(pin_0_relay, HIGH);
function_0_relay();
}
digitalWrite(pin_0_relay, HIGH);
void function_0_relay(){
digitalWrite(pin_0_relay, HIGH);
state = 1;
}
Off
Off State
Switches the component off.
void function_0_relay(){
digitalWrite(pin_0_relay, LOW);
function_0_relay();
}
digitalWrite(pin_0_relay, LOW);
void function_0_relay(){
digitalWrite(pin_0_relay, LOW);
state = 1;
}
5 - Servo
Connection scheme
Scheme made with Fritzing.
Functions
Degree
Turn servo to 0 degree
Turn servo to 180 degree
This function will turn the servo to the degree specified in the function name.
void function_1_servo(){
servo_0.write(0);
function_1_servo();
}
servo_0.write(0);
void function_0_servo(){
servo_0.write(0);
state = 1;
}