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

Extension: add Craft & Code #6016

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

Conversation

@martinwork
Copy link
Contributor Author

@abchatra
How to execute code only on hardware?

This extension has a cpp file simply to avoid strobing a simulator pin
https://github.com/KitronikLtd/pxt-kitronik-Craft-and-Code/blob/master/customPinControl.cpp

I suggested using control.deviceName(). Is there a better way?
https://makecode.microbit.org/_ATpc8WHe5RJ7
image

@abchatra
Copy link
Collaborator

@martinwork that seems good way to me. Other hardware specific API are deviceSerialNumber, hardwareVersion etc. But harder to parse on what is for hardware and what is not.

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