Hi, this is my first Arduino project. I was looking for a way to control LED lights for an art project for school and I can't figure out how to do a very specific series of events. I have a Nano v3.0 with a 328 chip. Any help would be greatly appreciated!
When a normally off momentary switch is pressed, I would like the following to happen:
- A Blue LED fades up to 80% over about 1 second (preferably using a cos/sine curve rather than linearly), then
- It fades up the rest of the way, from 80% to 100% while a White LED also fades up from 0% to 100% at the same time (this should be very rapid, say 1/4 of a second)
- After both LEDs reach 100% they both fade out over about 1 second.
- They remain off until the switch is pressed again.
- When the switch is pressed, steps 1-4 would happen again.
Can anyone help me with some code? I know it's probably not very complicated, but I'm extremely new to sketches (and coding in general) and I'm not even sure how to search for that type of instruction, so I thought I would see if anyone could help me out. Thanks!