extern "C" {
void myInit();
void myLoop();
int myAdd(int, int);
int buttonCheck();
int buttonCheck2();
int buttonCheck3();
void onBlue(); //turn on blue LED
void offBlue();//turn off blue LED
void onGreen(); //turn on green led JEK
void offGreen(); //turn off green led JEK
void onYellow(); //turn on yellow led JEK
void offYellow(); //turn off yellow led JEK
}
int num1;
void setup() {
Serial.begin(9600);
myInit();
// This is just a dummy example showing inline assembler using the asm
//"directive"
// Refer to this tutorial, or similar, for details of inline assembler
//in Arduino:
// https://ucexperiment.wordpress.com/2016/03/11/arduino-inline-
//assembly-tutorial-5-2/
//asm("ldi r26,42");
num1 = 1;
}
void loop() {
myLoop();
//int ans = myAdd(num1, 25);
//int ans =0;
int ans = myAdd(num1, 25);
if(ans> 500)
onBlue();
else
offBlue();
if(ans == 200)
onGreen();
else
offGreen();
if(ans < 50)
onYellow();
else
offYellow();
//delay(ans);
Serial.print("Answer: ");
Serial.println(ans);
Serial.println("------------------------------");
int b = buttonCheck();
Serial.println(b);
if (b == 1)
num1 = 2000;
int c = buttonCheck2();
Serial.println(c);
if (c == 1)
num1 = 175;
int d = buttonCheck3();
Serial.println(d);
if (d == 1)
num1 = 1;
}