In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Matthias09 wrote: Ok, I think it's 'old' signals comming in from the last reading loop. I increased the times between to reading to 0.5sec and there were no false (lower readings anymore). So this smaller values must have been signals from the previous pulse that were bouncing back from long distant other objects and arriving shorlty after I've sent the 2nd pulse and put the pin to input mode and start counting until I recieve something. However I just tried an older code with classical pulseout, pulsein and with 10ms pause between two reads and that worked just fine. When I use the same 10ms pause for the new algorithm, it gives me most of the time the lower of the two values (in Position two from post above then most of the time 20s). So is there anything PULSEIN does, what I would have to do manually in the new code as well? Matthias ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=394074#m401265 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)