M5Stick-C も、M5Stick-C Plus 同様に、G36/G25は同じポートを利用しています。
片方のピンを利用しているとき、もう片方のピンはフローティング入力(プルアップもプルダウンもしない状態)にしておいてください。例えば、G36ピンをADCの入力として使っている場合、G25ピンはフローティングにしてください。
URLはかけないので、本家の情報をみてください。
M5StickC PLUS ESP32-PICO Mini IoT Development Kit
G36/G25 share the same port, when one of the pins is used, the other pin should be set as a floating input
For example, to use the G36 pin as the ADC input, Configuration the G25 pin as FLOATING
と、書いてあります。
(例)
setup()
{
M5.begin();
pinMode(36, INPUT);
gpio_pulldown_dis(GPIO_NUM_25);
gpio_pullup_dis(GPIO_NUM_25);
}
void loop() {
int value = analogRead(36) ;
Serial.println(value);
delay(1000);
}
以上です。