String[] a = split(trim(serial), ','); //a new array (called 'a') that stores values into separate cells (separated by commas specified in Arduino program)
int s2 = int(map(int(a[1]),1,1023,1,400));
int s1 = int(map(int(a[0]),1,1023,1,1023));
for (int j = 1; j <109; j++) {
if (s1==x[j]){
for(int i=1; i<400 ; i++){
if(s2==y[i]){
println("Hi");
}
}
}
}
*x[j] and y[j] are two arrays to comparison the sensor value.
now, i have an issue, With each iteration of the loop (every step j <109; j++ and i<400 ; i++) "Hi" is printed.
I read some data from arduino and after use map() to make a new range, I can't plot them:
this is my code:
what's wrong!!!!!!!!!!!!!!!
why "Hi" can not printed?
String[] a = split(trim(serial), ','); //a new array (called 'a') that stores values into separate cells (separated by commas specified in Arduino program)