#include "LEDDisplayDriver.h"
bool ledOnBoardVal = LOW; //You can choose HIGH-on or LOW-off as startposition
const byte numberOfDigits = 4;
const byte dataPin = A2; //A4 is de SDA van de TWI op een Uno NIET GEBRUIKEN
const byte clockPin = A1; //A5 is de SDL van de TWI op een Uno NIET GEBRUIKEN
LEDDisplayDriver display(dataPin, clockPin); //Voldoet
void setup() {
Serial.begin(57600);
Serial.println("Test sketch started");
display.setBrightness(8);
}
//DISPLAY_INTR(display) // Only used for interrupt driven display, will not generate any code for other types:
int i=0;
void loop() {
i++;
display.showNum(i);
//display.update(); // Only needed if fourth parameter to LEDDisplayDriver is false
toggle_ledOnBoard(); //Toggles the default on-board LED on or off
delay(100);
}
void toggle_ledOnBoard(void){ //Toggles the LED_BUILTIN on-board LED on or off *
ledOnBoardVal = !ledOnBoardVal; //Toggle value
digitalWrite(LED_BUILTIN, ledOnBoardVal); //Set Arduino boards onboard LED
} //Exit toggle_ledBin ---------------------------------------------------------
void disable_jtag(void) { //Disable jtag to free port C, enabled by default ****
#if defined(JTD) //Not all AVR controller include jtag
MCUCR |= ( 1 << JTD ); //Write twice to disable
MCUCR |= ( 1 << JTD ); //So stutter once
#endif //End of conditional compiling
} //Exit jtag_disable ----------------------------------------------------------