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

I wanted to get the ultrasonic distance, but I couldn't make it #3544

Closed
tangjie133 opened this issue Nov 2, 2020 · 10 comments
Closed

I wanted to get the ultrasonic distance, but I couldn't make it #3544

tangjie133 opened this issue Nov 2, 2020 · 10 comments

Comments

@tangjie133
Copy link

To Reproduce
I want to calculate the ultrasonic return distance by obtaining the pin high and low level changes, but the returned data is not correct,How long can this problem be fixed?
Expected behavior:
Serial printing pulse duration,This only works on V1 and fails on V2.

Screenshots:
QQ截图20201102151352
link:https://makecode.microbit.org/_Joc6xW1jy2Ls

@abchatra
Copy link
Contributor

abchatra commented Nov 3, 2020

@tangjie133 have you tried /beta?

@tangjie133
Copy link
Author

Yes, the data returned by V1 version is continuous. Although V2 version can return data, but the returned data is not continuous, it will return "0"

@abchatra
Copy link
Contributor

abchatra commented Nov 3, 2020

@jaustin

@pelikhan
Copy link
Member

pelikhan commented Nov 10, 2020

v2 fix in #3642

@abchatra
Copy link
Contributor

Fixed @tangjie133 please validate.

@tangjie133
Copy link
Author

Using the same code to read ultrasound is still problematic, as is infrared.
Infrared library link:https://github.com/1010technologies/pxt-makerbit-ir-receiver
Ultrasonic link:https://github.com/DFRobot/pxt-maqueen
These two work normally in V1.

@abchatra
Copy link
Contributor

@tangjie133 did you try /beta?

@abchatra abchatra reopened this Nov 17, 2020
@tangjie133
Copy link
Author

yes

@microbit-mark
Copy link
Contributor

CODAL v0.2.24 has now been released to https://makecode.microbit.org/stable can you check here to see if this still reproduces @tangjie133 ?

@microbit-mark
Copy link
Contributor

@tangjie133 We have reports from people using the extension that this is now fixed. I will close here, but feel free to re-open if you still see issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants