Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearer code for ultrasonic servo parameters #96

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

artificialdetective
Copy link

@artificialdetective artificialdetective commented Dec 10, 2024

I was just about to expand ultrasonic.h to cover Bittle's leg positions when I noticed you already had. I found it difficult to tell what was going on in the 'allParameter' array however, so I changed it to a vertical list and added some annotations.

In addition, I added code to calculate the average distance to reduce the effect of sensor noise.

Averaging multiple distance readings stabilises Bittle's otherwise constant servo jitter due to small fluctiations in sensor readings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant