🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5StampS3:GPIO3 Analog input don't work

    Modules
    3
    3
    334
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gohan_oishii
      last edited by

      I am using the analogue input with the M5Stamp S3, but GPIO3 is constantly outputting 4095.
      Other outputs give the correct values.
      I use Arduino IDE 2.3.3, and the code is

      void setup() {
        Serial.begin(115200); 
        for(int i=1;i<=15;i++){
            pinMode(i,ANALOG);
        }
      }
      void loop() {
          
         int index = 0; 
      
        for (int pin = 1; pin <= 15; pin++) {
          v[index] = analogReadMilliVolts(pin); 
          Serial.print(String(v[index]));
      
          if (index < 13) { 
            Serial.print(",");
          }
      
          index++; 
        }
      
        Serial.println(); 
        delay(1000);
          
      }
      
      
      
      
      felmueF teastainT 2 Replies Last reply Reply Quote 0
      • felmueF
        felmue @gohan_oishii
        last edited by

        Hello @gohan_oishii

        GPIO3 on the ESP32S3 is a strapping pin (see here) and is pulled up via external 10 k resistor (see schematic here).

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • teastainT
          teastain @gohan_oishii
          last edited by teastain

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • First post
            Last post