float t = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
t = t + 0.1;
Serial.println( linear_fun(t));
delay(2);
}
int linear_fun(float x) {
return -5 * (x - 6) * (x - 6);
//note: here, you can put math problems here (like linear equaation) for it to solve.
}