You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First I want to thank you for your work, and your contribution to the maker community. You products are great and this KIT is again a perfect example.
Nevertheless, I found a misleading typo in the comment of the DistanceSensor .ino file.
floatgetDistance()
{
float echoTime; //variable to store the time it takes for a ping to bounce off an objectfloat calculatedDistance; //variable to store the distance calculated from the echo time//send out an ultrasonic pulse that's 10ms longdigitalWrite(trigPin, HIGH);
delayMicroseconds(10);
...
The call delayMicroseconds(10) delay for 10 microseconds, however the comment says: "an ultrasonic pulse that's 10ms long"
it should be "10us", nothing bad, but it maybe misleading for non-physicists.
Thank you again, and I wish you a nice day,
Yori
The text was updated successfully, but these errors were encountered:
After more careful readings of the datasheet of HC-SR04 the comment "send out an ultrasonic pulse that's 10ms long" is actually not correct.
According to the datasheet: https://cdn.sparkfun.com/datasheets/Sensors/Proximity/HCSR04.pdf , a series of 8 impulsions at 40 kHz are triggered when a signal longer than 10us is send to the trig INPUT. When the echo is received an impulse is send to echo OUTPUT proportional to the two-way-ranging measured duration.
I'd suggest to correct this misleading comment and add the link to the datasheet in the source code for more details.
Dear SparkFun,
First I want to thank you for your work, and your contribution to the maker community. You products are great and this KIT is again a perfect example.
Nevertheless, I found a misleading typo in the comment of the DistanceSensor .ino file.
The call
delayMicroseconds(10)
delay for 10 microseconds, however the comment says: "an ultrasonic pulse that's 10ms long"it should be "10us", nothing bad, but it maybe misleading for non-physicists.
Thank you again, and I wish you a nice day,
Yori
The text was updated successfully, but these errors were encountered: