Hello I’m a college student in a circuit fundamentals class. I was assigned to make my own circuit using an Arduino UNO and some basic components. So far I have the build that I want to program done, but writing the program is somewhat tedious. I wanted to have a theme of some form of alarm clock that is associated with timing using the default millis() function from the Arduino IDE. I have snippets of code from various projects I’ve done as class assignments, but I’m unsure whether throwing them together will work.
I know the basics of coding, but only in python or java. I was wondering if there was someone that could help me figure out how to write this code such that I won’t have to go through the troubleshooting process seeing as how my project is due tomorrow.
I’m very grateful for any help or advice! I’ve attached what I currently have built and below is a basic fundamental flow chart of my intended circuit:
- The switch begins a counting time
- The tilt switch allows for full reset of said time
This is my personal struggles:
- The multicolor LED is connected to three pins (5,6,7)
I would like to run a RGB spectrum through this LED.
As the LED progresses with time, the single color LEDs will light up as the multicolor LED emits that color in the following order (Red, Yellow, Green, Cyan).
As the light progresses I’d like the photoresistor to transmit a similar progressively weaker resistance such that the piezo speaker gets louder.
Along with the color progression, I would like my piezo speaker to ring progressively louder.
The colors are for the effect of a sunrise if anyone is curious. If the picture is unclear I have a list of associated connections for each of the pieces below:
Pin # - Device
2 - Switch output
4 - Tiltswtich output
5, 6, 7 - Multi-color LED input
8 - Piezo Input
10, 11, 12, 13 - single color LED inputs (Cyan, Green, Yellow, Red; respectively)
A0 - Photoresistor Input