Minimalist library for Ultrasonic Module HC-SR04, PING))) and Seeed SEN136B5B to Arduino
DistanceRead
is now Read()
[#47]read()
Documentation, examples and other references have been updated.
The old method still works, but a depreciation message is launched.
pulseIn
method [#45]pulseIn()
to prevent any incompatibility problems with platforms that do not have this method implemented.My thanks to the contributions of the whole community, especially @OtacilioN and @per1234 🖖
Prevents lock-up when waiting for echo return. Delegated Ultrasonic constructor for three-pin operation
The timeout is an optional parameter (20000UL by default) in the constructor or defined at runtime.
On the constructor:
Ultrasonic ultrasonic(12, 13, 40000UL);
Or in runtime:
ultrasonic.setTimeout(40000UL);
Tanks @eliotlim