I am trying to build an accurate measuring 'eye' on my car robot (yep, back at it!). I have tried using the HC-SR04 but it is relatively unstable. I am hoping the EZ1 unit is more stable and accurate. But, not having much luck. Have tried the code posted awhile back, see below, but it very unstable. Any suggestions?
symbol varA = w0 symbol varB = w1 symbol varC = w2 symbol varD = w3 symbol varE = w4 symbol varX = w4 main: setfreq m8 do serin b.1, N9600_8, varA, varB, varC, varD, varE 'let varX = VarB - 48 * 10 + VarC - 48 * 10 + VarD - 48 debug pause 600 loop stop