#include <LiquidCrystal_I2C.h> // Library for LCD
#include "Normal.h"
Normal_class Normal;
int updateInterval= 500; // interval between updates
unsigned long lastUpdate; // last update of position
uint8_t Value;
bool Displayact = false;
void setup()
{
Serial.begin(9600);
Normal.setup();
delay(1000);
Displayact = true;
// Timer0 is already used for millis() - we'll just interrupt somewhere
// in the middle and call the "Compare A" function below
// OCR0A = 0xAF;
// TIMSK0 |= _BV(OCIE0A);
OCR1A = 0xF424;
TIMSK1 |= _BV(OCIE1A);
}
void Update(unsigned long currentMillis)
{
if((currentMillis - lastUpdate) > updateInterval) // time to update
{
lastUpdate = millis();
if (Displayact)
{
Serial.println("Update");
Normal.Nainloop();
}
}
}
SIGNAL(TIMER1_COMPA_vect)
{
unsigned long currentMillis = millis();
// Update(currentMillis);
}
void loop()
{
Normal.Nainloop();
delay(200);
}