You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adc = ADC(pin) # create an ADC object acting on a pin
v1 = adc.read_u16() # read a raw analog value in the range 0-65535
v2 = adc.read_uv() # read an analog value in microvolts
print(v1, v2)`
gives:
MPY: soft reboot
Traceback (most recent call last):
File "", line 5, in
TypeError: argument has wrong type
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
On esp32-C3-Zero from Waveshare using
MicroPython v1.24.1 on 2024-11-29; ESP32C3 module with ESP32C3
`# adc_esp32C3
from machine import ADC, Pin, ADCBlock
pin=Pin(3, Pin.IN)
id=1
block=ADCBlock.init(id, bits=12)
adc = block.connect(3, pin)
adc = ADC(pin) # create an ADC object acting on a pin
v1 = adc.read_u16() # read a raw analog value in the range 0-65535
v2 = adc.read_uv() # read an analog value in microvolts
print(v1, v2)`
gives:
MPY: soft reboot
Traceback (most recent call last):
File "", line 5, in
TypeError: argument has wrong type
Help please /Fisherman
Beta Was this translation helpful? Give feedback.
All reactions