-
Notifications
You must be signed in to change notification settings - Fork 54
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
Pin 0 digital input may be high by default on V2 micro:bit #357
Comments
I think it must be an old hex file with a bug that has been fixed. I see the same problem with the downloaded hex, but not with a newly built hex. |
Based on issue #17 V2 should be configured to match V1 and set the pins default state to pull down: Looking at the source code we have the default pull configured to down in the target.json files: Line 26 in 3fa546f
codal-microbit-v2/target-locked.json Line 18 in 3fa546f
And the default mode is applied here: |
Ah, thanks @martinwork! |
Okay, so the issue was from an old MakeCode release and has been fixed in current CODAL, so we can close this as fixed. |
To reproduce:
The HEX file seems to work as expected on a micro:bit V1 - no diamond shown by default. Diamond is shown when 3v pin connected to pin 0, and disappears when disconnected.
![microbit-screenshot (2)](https://private-user-images.githubusercontent.com/42380137/256273346-02311362-ce4a-4a49-8ebb-4befe57c103c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMzg2NjYsIm5iZiI6MTczOTIzODM2NiwicGF0aCI6Ii80MjM4MDEzNy8yNTYyNzMzNDYtMDIzMTEzNjItY2U0YS00YTQ5LThlYmItNGJlZmU1N2MxMDNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDAxNDYwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3MGE5MmJkMGQ2MGFlODlhNGFlMDUyODQ4MzI3NTdhY2U3OWQzMTg2NDcyOWFjM2VmMzYzMDU3ODU5MjM2MWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.FX8DuPKsZ2cxd3SFJow0DTR-ov5bjH8qr5wuYgOP814)
Are there any mitigations we can add in code, or does this need some other kind of fix?
The text was updated successfully, but these errors were encountered: