Skip to content

Instantly share code, notes, and snippets.

@mskf1383
Created August 3, 2024 07:59
Show Gist options
  • Select an option

  • Save mskf1383/8ce5732c3cb18c7d84d5e0371c2ed1aa to your computer and use it in GitHub Desktop.

Select an option

Save mskf1383/8ce5732c3cb18c7d84d5e0371c2ed1aa to your computer and use it in GitHub Desktop.
// setup environment
for (angle = 0; angle <= 180; angle += 10) {
// set angle
baseMotor.write(angle);
delay(1000);
// get distance
distance[angle/10] = getDistance();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment