#include<Arduino.h>
#define BUILTIN_LED_DQ 2
#define RGB_LED_RED_DQ 13
#define RGB_LED_GREEN_DQ 5
#define
void setup() {
// put your setup code here, to run once:
pinMode(DQ_BUILTIN_LED, OUTPUT);
pinMode(DI_BUTTON, INPUT_PULLUP);
}
void loop() {
led_blink();
}
void led_blink(void){
uint8_t led_state = 0;
uint32_t current_time = 0;
static uint32_t last_execution_time = 0;
current_time = millis();
if(current_time>= (last_execution_time + LED_TIME)){
last_execution_time = current_time;
led_state = digitalRead(DQ_BUILTIN_LED);
led_state = !led_state;
digitalWrite(DQ_BUILTIN_LED, led_state);
}
}