I'm in a doctoral program at an art college, and my professor assigned me this project. It seems like my professor, who has an engineering background in media arts, assigned this task. I'm not sure how to proceed. Could you help me?
The task involves attaching LEDs in red, yellow, and blue, along with a switch, to a board. When the switch isn't pressed, the blue LED should light up. When the switch is pressed, the yellow LED should gradually light up and then change to red.
'digitalwrite-read', 'analogwrite-read','if' must be used.
The typical momentary button will work fine this way - the metal legs going through (and being thus connected)
(from wokwi)
So if you plug the button across the central rail of the breadboard, the 2 pins on one side are right to use.
That being said, in case of doubt, connecting diagonally across the button always work and you don't need to think about
@h-lim we suppose your teacher gave you this assignment so that you learn something about the Arduino world, programming etc... So we won't do your homework as you would not learn anything.
What's your background with C++ and basic electonics? Do you have a class on this?