debuging


  this program should time wheel rotation give speed , duration of coasting , calculate deceleration.
can tell why won't progress past rotation 1?  i not sure if using long unsigned properly.
 at first checks speed above starting speed , buzzes 1 second ,  checks specified beginning speed coast begins.  then counts 100 wheel revolutions , measures end speed , calculates deceleration, , starts test.  i have adjustable oscillator optical pnp output , works rotation part ok.  my first sketch hung on first speed test too.    

code: [select]
while (test == 100) break;

that's pretty useless line.  if test not 100 fails right off , nothing.  if test 100 breaks while loop , still nothing. 


Arduino Forum > Using Arduino > Project Guidance > debuging


arduino

Comments