Skip to content

QT Py Analog Input pin reading voltage even when nothing is connected #4469

@levgrav

Description

@levgrav

I have nothing connected to the QT Py except for the USB C cable and I am reading the pin value for A3 and it gives me a reading that fluctuates between around 25000 and 32000 and that does not make sense to me. Is this normal?

Here is my code:

import board
import time
from analogio import AnalogIn

therm = AnalogIn(board.A3)

while True:
    v = therm.value
    print(v)
    time.sleep(0.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions