Page 1 of 1

No ADC class in machine module

Posted: Mon Feb 04, 2019 10:48 am
by Turbinenreiter
Why do the docs mention and ADC module, but my pyboard flashed from current master (98f790b) says there is none?

Code: Select all

MicroPython v1.10-46-g98f790b03-dirty on 2019-02-04; PYBv1.1 with STM32F405RG
>>> import machine
>>> machine.ADC()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'ADC'

Re: No ADC class in machine module

Posted: Mon Feb 04, 2019 11:40 am
by Roberthh
Since the new structure of the docs that is irritating. There is a note in the fineprint that not everything applies to every board. Before the change, there were clear sections in the docs for every board.
B.t.w.: for PyBoard, ADC is in the pyb module, whith it's own set of methods. So maybe a note at machine.ADC could help.

That irritation may slowly fade away, if the firmware of the new Pyboard follows the new module structure.

Re: No ADC class in machine module

Posted: Mon Feb 04, 2019 12:27 pm
by Turbinenreiter
Wow, that stuff is still not done? Isn't the machine module around since at least 2 years?