-
Notifications
You must be signed in to change notification settings - Fork 27
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
sonar sensor problem(hcsr04) - time_pulse_us #26
Comments
What's the result you get in a v1 vs v2? |
microbit v1 show distance on led screen. |
I find v0.2.23 of codal-microbit-v2 now released. |
Yes MicroPython is now updated to codal v0.2.23. |
@crouse12 could you please test with the build from https://github.com/microbit-foundation/micropython-microbit-v2/actions/runs/419939816 (this is an automatically built version from a commit on master, so isn't exactly what the next release will look like, but does have the updated CODAL). |
Looks like PR #58 is adding the CODAL method to the MicroPython pin API. I think ultimately what we need is to make sure MakeCode also had an issue in this area, and the feature was originally implemented in the MakeCode code too, so the functionality has been moved to CODAL. |
If the built-in MicroPython one works, is it ok to just keep that the way it is? |
I think if it's not a trivial switch over, I'm happy to leave things as they are with the V2 implementation. |
Great, closing this as fixed. 🎉 |
The following code for hcsr04 can work on microibit v1, but it cannot work on microbit v2.
Python editor version for my test is 2.1.0-beta.7.
I think time_pulse_us or sleep_us has some bugs.
The text was updated successfully, but these errors were encountered: