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

First light sensor reading is always duff #3451

Closed
whaleygeek opened this issue Oct 20, 2020 · 2 comments
Closed

First light sensor reading is always duff #3451

whaleygeek opened this issue Oct 20, 2020 · 2 comments
Labels

Comments

@whaleygeek
Copy link
Contributor

Describe the bug
The first light sensor reading always seems to return 255

To Reproduce
Load file measure-fails.hex. Observe that the 'M' dims a little bit after a fraction of a second (this is the light sensing starting on-demand). Press B to read the max reading - it is always 255.

Expected behaviour
Load file measure-works.hex - this has a 100ms delay after the first reading and the first reading is junked. Press B to read the max reading - it is correctly the current maximum reading. (P.S. Don't try this if you are currently flying past the sun in a spacecraft, or sitting on a sun bed.)

Additional context
makecode.microbit.org version: 3.0.17
Microsoft MakeCode version: 6.0.18
microbit runtime version: v2.2.0-rc6

measure-fails.hex.zip
measure-works.hex.zip

Also paging @finneyj and @jaustin in case this is actually a DAL bug.

@microbit-mark
Copy link
Contributor

This was raised on the DAL in lancaster-university/microbit-dal#426

@abchatra
Copy link
Contributor

Dal issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants