Skip to content

analogRead doesn't work because value is set to 0 #21

Description

@SKnight-s

Hello,
I'm using BBC microbit v2 and I noticed that the analogRead function always gave us 0 (trying to read from a microphone).
In the file wiring_analog_nRF52.c, in the function analogRead , the variable is set to 0 when initialized.

The solution is to replace the line 109 "int16_t value = 0;" by "int16_t value;"
Then, it solves this issue.

Maybe I should have proposed a PR, but I'm not yet comfortable with that.

Thanks anyway for this library, because sandeepmistry/arduino-nRF5 doesn't support BLE for BBC microbit v2 and you do with NimBLE.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions