ADC attenuation #17972
Replies: 3 comments 11 replies
-
Connect with a terminal and then: |
Beta Was this translation helpful? Give feedback.
-
After giving the print command I get: So ATTn_11DB is there |
Beta Was this translation helpful? Give feedback.
-
I would like to thank everyone for the given comments and help. Found out that although PyCharm was given a warning the ATTEN commands works in the ESP32 that I use together with micropython. I also will have a look in the newer MicroPython Tools (thanks Josverl) Best Regards |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use the ADC input on an ESP32-WROOM-32 with the following code (using PyCharm & Micropython):
`from machine import ADC, Pin
adc1 = ADC(Pin(32))
val = adc1.read_u16()
adc1.atten(ADC.ATTN_11DB)
`
I am getting an error message on the word atten "Unresolved attribute reference on 'atten' for class 'ADC'. Tried a lot of other solutions from all kind of websites, but nothing helps.
Someone having an idea how to solve this
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions