Skip to content

Simulator pin controls do not affect read_digital or read_analogue #1241

@martinwork

Description

@martinwork

Bug Description

Values returned by read_digital and read_analogue are not affected by simulator pin controls

Check simulator serial output for program below

Change pin input controls. Only is_touched() value changes.

from microbit import *
while True:
    p0 = pin0.is_touched()
    p1 = pin1.read_digital()
    p2 = pin2.read_analog()
    lg = pin_logo.is_touched()
    print(p0, p1, p2, lg)
    sleep(100)

Expected behavior

read_digital and read_analogue are affected by simulator pin controls

Environment

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows, iPadOS
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions