problem with plotting the map()
in
Programming Questions
•
3 months ago
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?
- best regard
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)
- float s2 = map(Integer.parseInt(a[1]),1,1023,1,400);
- float s1 = map(Integer.parseInt(a[0]),1,1023,1,1023);
- for (int j = 1; j <109; j++) {
- if ((s1==x[j]) && (second() % 5 == 0)){
- for(int i=1; i<400 ; i++){
- if((s2==y[i]) && (second() % 5 == 0)){
println("Hi");
} - }
- }
- }
- best regard
1