Analog out to non-A0 fails in CircuitPython 6.0.0

I’m using CircuitPython with the 6.0.0 UF2 with my Seeeduino Xiao, using mu-editor. I updated mu-editor to be able to use Serial with the Xiao.

When I try to designate a pin other than board.A0 as AnalogOut I get the error

ValueError: AnalogOut not supported on given pin

Sample program that triggers the error

import time
import board
from analogio import AnalogOut

a8 = AnalogOut(board.A8)

while True:
for x in range(255):
a8.value = x
time.sleep(0.1)

Outputs:

File “code.py”, line 5, in
ValueError: AnalogOut not supported on given pin

I can create AnalogIn(board.A8) but not AnalogOut(board.A8).

Any suggestions?

I downloaded CircuitPython 6.1.0-beta.2 and it seems to fix the problem.

1 Like