Arithmetic question


hello !
i make arithmetic, not sure how it. here code :

code: [select]

      case 'h':         //stabtrim test
      delay (11);
      stabtrim = "";
      stabtrim += getchar();
      stabtrim += getchar();
      stabtrim += getchar();
      stabtrim += getchar();
     
      if (stabtrim != stabtrimold){
         lcd.setcursor(0, 0);
         delay (11);
         // newstabtrim = (0.1289 x stabtrim) + 4.1
         lcd.print("trim : " + stabtrim);
         stabtrimold = stabtrim;
      }       
      break;


so, can see in comments, have change stabtrim value formula display newstabtrim. idea how can ?

go here first , read.  pay particular attention section on mathematical operators. 

you've got it, you're using wrong symbol multiplication. 


Arduino Forum > Using Arduino > Programming Questions > Arithmetic question


arduino

Comments