Hey all,
Following some research i came across "blink without delay" using millis to prevent my entire code to freeze during the "delay" function. I was able to find an amazing tutorial to optimize the code using functions and class to have a clean code and it works just fine: A classy solution | Multi-tasking the Arduino - Part 1 | Adafruit Learning System
However I want to create specific patterns: for example have one led blink then turn it off, then have a 2nd led blink, and so on, could anyone tell me how to achieve this code using the blink without delay code from the tutorial ?
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
delay(300);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
delay(120);
digitalWrite(6, HIGH);
digitalWrite(7, HIGH);
delay(300);
digitalWrite(6, LOW);
digitalWrite(7, LOW);
delay(120);
Thanks.