Skip to content

Typo in the tutorial DistanceSensor #33

@agy-why

Description

@agy-why

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.

float getDistance()
{
  float echoTime;                   //variable to store the time it takes for a ping to bounce off an object
  float calculatedDistance;         //variable to store the distance calculated from the echo time

  //send out an ultrasonic pulse that's 10ms long
  digitalWrite(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions