this is my simple code:
now, i have an issue,
With each iteration of the loop (every step j <109; j++ and i<400 ; i++ ) "Hi" is printed.
- 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");
- }
- }
- }
- }
now, i have an issue,
With each iteration of the loop (every step j <109; j++ and i<400 ; i++ ) "Hi" is printed.
I want one print of "Hi' in all iteration.How?
any idea?
Thank you in advance for your response.
1