Page 1 of 1

how to select an input?

Posted: Mon Aug 30, 2021 10:49 pm
by aabbcc
Hello,
I intend to use any port for meassuring of voltage.
But in the pin diagram do the ports have 2 or 3 descriptions (port 12: touch- ADC 15 - GPIO15).
How have I to define that port 12 should be analog input?
Is there a description how to do so?
Thanks
regards
aabbcc

Re: how to select an input?

Posted: Mon Aug 30, 2021 10:56 pm
by username

Re: how to select an input?

Posted: Tue Aug 31, 2021 8:29 pm
by aabbcc
Thank you, that was a very helpful link!
However, it doesn't work.
I did include driver/adc.h, but after the configuration of the port with
adc1_config_width(ADC_WIDTH_BIT_12);
adc1_config_channel_atten(ADC1_CHANNEL_0,ADC_ATTEN_DB_11);
do I get the failure message:
expected constructor, destructor, or type conversion before '(' token
Is it possible, that the linked manual contains non-Arduino header files?
My problem is: Arduino finds that header filess, I partout not.
Regards
aabbcc

Re: how to select an input?

Posted: Tue Aug 31, 2021 10:00 pm
by username

Re: how to select an input?

Posted: Wed Sep 08, 2021 8:02 pm
by aabbcc
Yes, it was very helpful!
I did it try yesterday and it works immediately!
Thank you very much for your help!
regards
aabbcc

Re: how to select an input?

Posted: Thu Sep 09, 2021 12:49 am
by aabbcc
PS:
Do you have maybe a source solving my other problem:

My ESP32 (exactla: LILYGO® TTGO T-Call V1.4 ESP32 Wireless Module SIM Antenna SIM Card SIM800L) doesn't start after power on.
It is powered by a potent power unit with 3,7 V at the backside small power jack.

After power on is no reaction. I have to press the RST switch and then starts immediately.
Just this is not allowed, it must start without manually handling.

In my manual did I found some recommandations like 10 k between gnd and en or 10 between pin x and pin y but nothing works.

Do you also have a source for my problem?

Regard
aabbcc