Finding rise time and amplitude

thanks but how in arduino? Like this

<strong>prevData = newData;//store previous value
//newData = ADCH;//get value from A0
if (prevData < 43 && newData >= 43){//if increasing and crossing midpoint
period = timer;//get period from current timer value
timer = 0;//reset timer
}</strong>

**timer++;//increment timer**

?