mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
22 lines
339 B
C++
22 lines
339 B
C++
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
|
|
// Repository: https://github.com/okalachev/flix
|
|
|
|
// Main LED control
|
|
|
|
#define BLINK_PERIOD 500000
|
|
|
|
void setupLED()
|
|
{
|
|
pinMode(LED_BUILTIN, OUTPUT);
|
|
}
|
|
|
|
void setLED(bool on)
|
|
{
|
|
digitalWrite(LED_BUILTIN, on ? HIGH : LOW);
|
|
}
|
|
|
|
void blinkLED()
|
|
{
|
|
setLED(micros() / BLINK_PERIOD % 2);
|
|
}
|