I have an Arduino Nano with an ATmega328P. I'm using Atmel Studio to program it in C and I need to have the following program:
I have 5 inputs (PC3-PC7), each should have their separate timer and each drive 2 (one red, one green) LEDs.
- Each HIGH-level on an input pin (PC3-PC7) triggers a separate timer, which should be 10 minutes long.
- The HIGH-level on the input pins should last over the course of these 10 minutes. If it changes to a LOW-level while running, something happens (LEDs blink, buzzer on).
- If the timer has reached the 10-minute mark, something happens (red LED off, green LED on, buzzer on).
I think the time.h
library is needed for this, but I have no idea how I could program this. Any help is appreciated.