Assignment 2: Fade!

Due Date: January 14th, 2022

Back to Project Page

Overview

The prompt is to create a schematic, circuit, and code that uses several LEDs, a button, tilt switch, or a switch created by me, a for-loop, digitalWrite(), digitalRead(), and analogWrite().

FINAL GIF

Process

CIRCUIT

SCHEMATIC, CALCULATION & ANNOTATIONS

The calculated resistance for Red and Green LED are 160Ω, so in actual circuit design, 220Ω resistance are used. Similar for Blue LED, the calculated resistance for the Blue LED is 85Ω; therefore 100Ω resistance are used.

White wires are connected to the buttons that control the individual LEDs on the right side (Pin 6, 5, 3). Buttons, Red, Green, Blue, and RGB LEDs are connected in parallel.

ARDUINO CODE

Back to Project Page