This is a basic question but I don't know why it isn't working.
I want that when a condition is satisfied, a variable increases its value in one (of course I've done this before but it isn't working). This is my code:
double count0 = 0;
if (neural.getResult(emg, eda, ax, ay, az, 1000) == 1){
count0 = count0 +1;
}
neural.getResult(emg, eda, ax, ay, az, 1000)
is constantly reading real time values of sensors and it gives me 1 or 0 depending of those sensors, I'm trying to count how many ones it's giving me, but when I print count0
it only shows me a 1, like if it's only entering once in the if