#include "Config.h"
LiquidCrystal_I2C lcd(0x27, 16, 2);
extern void Task1Loop();
extern void Task1Setup();
// unsigned long timer3=20;
// unsigned long t1,t2;
// bool I1=1; //digital inputs
// bool Q1,Q1a,Q2,Q2a;
// bool T1,T2,T3,T4; // bool transitions
// enum stepTask1_t {voidA,uno,dos,tres,cuatro};
// stepTask1_t stepTask1=voidA;
void setup() {
Serial.begin(115200);
pinMode(6, INPUT_PULLUP);
pinMode(7, INPUT_PULLUP);
Task1Setup();
// lcd.init();
// lcd.backlight();
// lcd.setCursor(2,0);
// lcd.print("KELAS XII 4");
// lcd.setCursor(0,1);
// lcd.print("SMAN 1 Tangerang");
// delay(4000);
// lcd.clear();
}
void loop() {
// put your main code here, to run repeatedly:
//readInputs();
//evalTransitions();
//Task1();
Task1Loop();
//writeOutputs();
//handleTimers();
}
// //======================== INPUTS ===========================
// void readInputs()
// {
// }
// //======================== TRANSITIONS ===========================
// void evalTransitions()
// {
// if(I1) T1=true;
// else T1=false;
// if(timer3==0) T3=true;
// else T3=false;
// }
//======================== MYMAIN =================================
// void Task1()
// {
// static int pstep;
// do
// {
// pstep=stepTask1;
// switch(stepTask1)
// {
// case voidA:
// stepTask1=uno;
// break;
// case uno:
// if(T1)
// {
// stepTask1=dos;
// }
// break;
// case dos:
// Display();
// stepTask1=tres;
// break;
// case tres:
// if(timer3==0)
// {
// stepTask1=cuatro;
// timer3=20;
// }
// break;
// case cuatro:
// Scroll();
// stepTask1=tres;
// }
// //----- for test ---------------------------
// // if(stepTask1==uno) digitalWrite(stepUno, HIGH);
// // else digitalWrite(stepUno, LOW);
// // if(stepTask1==dos) digitalWrite(stepDos, HIGH);
// // else digitalWrite(stepDos, LOW);
// //------------------------------------------
// }while(stepTask1!=pstep);
// }
//======================== OUTPUTS =================================
// void writeOutputs()
// {
// if(Q1!=Q1a)
// {
// DUMP(Q1);
// Q1a=Q1;
// }
// if(Q1) Display();
// // if(Q1) digitalWrite(Q1state, HIGH);
// // else digitalWrite(Q1state, LOW);
// if(Q2!=Q2a)
// {
// DUMP(Q2);
// Q2a=Q2;
// }
// if(Q2) Scroll();
// //DUMP(Q2);
// }
// void handleTimers()
// {
// static unsigned long pm=0;
// if((millis()-pm)>=10)
// {
// pm=millis();
// if(stepTask1==tres)
// {
// if(timer3>0) timer3--;
// }
// }
// }
// void Display()
// {
// lcd.setCursor(1,0);
// lcd.print("IRGI SETIAWAN");
// }
// void Scroll()
// {
// lcd.scrollDisplayLeft();
// }
// int q;
// void loop(){
// int statsButton = digitalRead(6);
// int statsButton2 = digitalRead(7);
// // if(statsButton == HIGH){
// if(q==0){
// q++;
// DUMP(q);
// lcd.setCursor(1,0);
// lcd.print("IRGI SETIAWAN");
// }
// delay(200);
// lcd.scrollDisplayLeft();
// //lcd.clear();
// if(statsButton2 == LOW){
// lcd.clear();
// }
// }