WOOOHOOO ! IT IS WORKY !!! ... or mostly so - some fine tuning is still required...
But holy cow lets compare ....
236 micro seconds vs 18,392 micro seconds ..
Ya a bit of a difference...
Here are some pros and cons of the new PulseIn
PROS
- WAY FASTER (nearly 2 orders of magnitude)
- Probably DOES NOT INTERFERE WITH SERVOS !!! - a big one for me
CONS
- Possibly a little less accurate - although I have not noticed .. additionally a little pre-filtering can be done easily
Another nice accessory from this project was the load timings.. now the Arduino load becomes easily observable .. this takes a considerable amount of mystery out of trouble-shooting
Congrat, it's a lot faster
Congrat, it's a lot faster !
I've a question : with the non blocking script, how to take the current value ?
By exemple can we use someting like this ? : if ( sr04.value() <= 30) .....
I didn't found UltraSonic service in the javadoc .
Hi Bettlejuice .. Ya -
Hi Bettlejuice ..
Ya - Javadocs are out often out of sync.
Please refere to this post for strategies on getting meaningful information - http://myrobotlab.org/content/what-methods-can-i-use
My latest developments have not yet been "checked-in"..
But the interface should be similar to this :
(blocking mode)
(non-blocking event mode)
The blocking mode is pretty trivial to implement - the non-blocking event mode would be very good for robotics ! (hopefully I can figure out how to do this)
Thank you
Thank you