Fundamental of Electronics
- Resistor x 3+
- RGB LED x 1
- Breadboard x 1
- Wires
Arduino Programming Language
- Int: Variables/Data Types
- begin(): function/communication/serial
- print(): function/communication/serial
- println(): function/communication/serial
- analogRead(): functions/analog I/O
- pinMode(): Functions/Digital I/O
- digitalWrite(): Functions/Digital I/O
- if: Structure/ control structure
- else: Structure/ control structure
- Comparison operators:
Task 1 Develop a program and a circuit that use potentiometer to control the color of RGB LED. As the voltage reading changes, the LED color will change.
Objectives of practice:
- Practice with serial.print() and serial.println() functions that display the voltage value and color of LED in the desired format.
- Practice with analogRead() function
- Use the if and else statement to control the RGB color
- Understanding the operation of RGB LED
Task 2 Modify the program, change the condition of if and else statement to develop a different color pattern of RGB LED when the potentiometer is switched.
Objectives of practice:
- More practice with if and else statement
- More practice with Comparison Operator and Boolean Operators