/* I am practising code that I have found
* on youtube
* Getting Started with PlatformIO
*
* Video Time 25:20
*
* My favorite discord channel is
* Engineering Artists
*/
// Define LED pin
#define LED_PIN 13
// In platformIO the
// FUNCTIONS HAVE TO BE LOCATED ABOVE THE LOOP()
//
// Arduino will allow you to put it below the loop()
// but this will cause issues when people use the code on
// different IDE
void blink_led(int LED, int delaytime) {
// Set output HIGH for Specified time
digitalWrite(LED, HIGH);
delay(delaytime);
// Set output LOW for specified time
digitalWrite(LED, LOW);
delay(delaytime);
}
void setup() {
// put your setup code here, to run once:
pinMode(LED_PIN, OUTPUT);
// Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
// Blink the LED at half-second interval six times
for (int i = 0; i < 6; i++) {
blink_led(LED_PIN, 500);
}
// Blink the LED at tow -second interval three times
for (int i = 0; i < 3 ; i++) {
blink_led(LED_PIN, 2000);
}
}