Skip to content

Add support for compass. #42

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

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Add support for compass. #42

merged 1 commit into from
Aug 30, 2022

Conversation

microbit-robert
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Aug 30, 2022

Deploy Preview for distracted-dubinsky-fd8a42 ready!

Name Link
🔨 Latest commit f0a02e8
🔍 Latest deploy log https://app.netlify.com/sites/distracted-dubinsky-fd8a42/deploys/630e3cdcea456a00089da68c
😎 Deploy Preview https://deploy-preview-42--distracted-dubinsky-fd8a42.netlify.app/demo
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

compassX: new RangeSensor("compassX", min, max, 0, "nT"),
compassY: new RangeSensor("compassY", min, max, 0, "nT"),
compassZ: new RangeSensor("compassZ", min, max, 0, "nT"),
compassHeading: new RangeSensor("compassHeading", 0, 360, 0, "deg"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit isn't documented in CODAL that I can see but MakeCode uses uBit.compass.heading() directly as as degrees value so this is all good.

Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks.

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit 640dd6c into main Aug 30, 2022
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the compass-support branch August 30, 2022 17:46
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