If I do the following ...
Code: Select all
>>> a = []
>>> x = machine.ADC (machine.Pin (36))
>>> x.read_timed (data = a, freq = 5000)
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: array or file name argument expected
(I tried "bytearray" but it didn't work.)
I would like to do this to save a timer on the ESP32 (I think I can do it like this or not?).
If there is a better method, please.
Thanks in advance!