/********************************************************************************************************************
/ Endrich IoT SBC Board project @ Endrich Bauelemente Vertriebs GmbH 2021
/
/ Example code : Using the IOT SBC v052 with Arduino IDE
/ Blinking the on board RGB LED
*********************************************************************************************************************/
#include <Arduino.h>
/* Endrich IoT Board HW definitions */
#define LED_RED PC13
#define LED_GREEN PA1
#define LED_BLUE PA2
// GPIO handling :
// digitalWrite(LED_xxx, LOW); turns the xxx LED on (it is active when the pin is LOW)
// digitalWrite(LED_xxx, HIGH); turns the xxx LED off (it is inactive when the pin is HIGH)
void setup() {
// Setting the appropriate GPIOs as OUTPUTS
pinMode(LED_RED, OUTPUT); digitalWrite(LED_RED, HIGH);
pinMode(LED_GREEN, OUTPUT); digitalWrite(LED_GREEN, HIGH);
pinMode(LED_BLUE, OUTPUT); digitalWrite(LED_BLUE, HIGH);
}
void loop() {
for (int i=0; i<3; i++) { digitalWrite(LED_RED, LOW); delay(100); digitalWrite(LED_RED, HIGH); delay(100);}
for (int i=0; i<3; i++) { digitalWrite(LED_GREEN, LOW); delay(100); digitalWrite(LED_GREEN, HIGH); delay(100);}
for (int i=0; i<3; i++) { digitalWrite(LED_BLUE, LOW); delay(100); digitalWrite(LED_BLUE, HIGH); delay(100);}
delay(1000);
}