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

Issue reading light level and pin at the same time #2256

Closed
microbit-mark opened this issue Jul 9, 2019 · 3 comments
Closed

Issue reading light level and pin at the same time #2256

microbit-mark opened this issue Jul 9, 2019 · 3 comments

Comments

@microbit-mark
Copy link
Contributor

micro:bit support: 22530 and 23067
Describe the bug
When reading light level and pin over serial in the same program, readings become eratic. Light level reads 0-255, but the Pin should read 0-1023, but instead we get the majority of readings at 255

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://makecode.microbit.org/_UqL8yYVj9MyM' and flash program
  2. Connect Pin0 to 3V, reading on Pin0 should be 1023
  3. Read serial data out and see that the majority of readings are 255

Expected behavior
Pin data should read from 0-1023

Additional info,

Have tried recreating this in the DAL see
Archive.zip but can't get a reproducer

@microbit-mark microbit-mark changed the title Iassue reading light level and pin at the same time Issue reading light level and pin at the same time Jul 9, 2019
@martinwork
Copy link
Contributor

Related? lancaster-university/microbit-dal#448

@martinwork
Copy link
Contributor

This repros without MakeCode if you read repeatedly and often, say 100Hz. There's a full 100% reading about every 0.05 seconds, with the ones between being 25%.

@abchatra
Copy link
Collaborator

This is tracked in the DAL repo. Closing here.

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

3 participants