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

EV3 populate distance from either IR or UltraSonic sensor. #2306

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

SirTechington
Copy link

Resolves

#1445

Proposed Changes

In the EV3 Scratch extension, allow the distance to be populated from an IR sensor if installed.

Reason for Changes

This is useful since the EV3 commercial kit (Lego 31313) contains only an IR sensor for distance sensing whereas educational kits (Lego 45544) contains the already supported UltraSonic sensor. This allows those with the commercial kit to use all Scratch EV3 features.

Note

The range of values from the IR sensor matches what comes from the UltraSonic sensor, but the units are different. The UltraSonic returns values between 0 and 100 inches (the extension hard-codes it to inches mode), and the IR sensor returns "proximity" in the range of 0 to 100%, where 100% corresponds to "approximately 50-70cm". This is no different from how the sensors report in native EV3 programming.

@SirTechington SirTechington reopened this Dec 2, 2019
@SirTechington SirTechington marked this pull request as ready for review December 2, 2019 03:05
@Kristina-Winterland
Copy link

Yes, my daughter and I are as well hoping that the IR sensor can be read by Scratch 3.0. After all, on their webpage, Lego officially had announced cooperation with Scratch 3.0 on behalf of EV3 but practice is not that jolly, apparently. Thank you for setting this request up for all of us who are waiting.

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.

2 participants