Break your calculation of curSamp up into individual calculations print each result on the serial monitor. Paul