Hi, Picatchu
nice code template ... easy to read !
some tricks :
change for :Code:if (PORTB.0 = rb0old) then goto changetest ' If there is no change then test again
this will loop till a change occurs ... ( much faster ! )Code:While (PORTB.0 = rb0old) Wend
Note here I did not understand why use the "change" feature : from your explanations ... if "back" signal detected, it simply turns PortB.0 input ON ( ... or OFF depending Hardware)
to me ( I can fail ...)Code:dummy = (time((6 * temp)+ 3300)) ' calculate part of the full calculation
it might be :
By the Way : Speed of sound in air = SQR ( 13 * 287* (273.15 + Temp) /10 )Code:dummy = (time*((6 * temp)+ 3300)) ' calculate part of the full calculation
... @ sea level ...
...
Alain
PS: May be you could try a "samples" request here ...
http://www.midascomponents.co.uk/




Bookmarks