Skip to content

GPIO input mode with softAP #953

@Aswinvt

Description

@Aswinvt

Hardware:

Board: ESP32 Dev Module
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: 115200

Description:

I am trying to read analog value from some sensors using ESP32 and that values are needed to be viewed in a browser, for that I have made ESP32 as AP, but after setting it as AP the only raw analog read value that I get is 4095.

Test code:

#include <WiFi.h>

 
const char *ssid = "TestAP";
const char *password = "testappwd";
 
void setup(){
  Serial.begin(115200);
  pinMode(0, INPUT);
  WiFi.softAP(ssid, password);
  Serial.println();
  Serial.print("IP address: ");
  Serial.println(WiFi.softAPIP());
}
 
void loop(){
  float IN = analogRead(0);
  Serial.println(IN);
  delay(1000);
}

Above is a test code to verify this issue after setting the ESP32 as AP the analogRead function only returns a value of 4095 only, otherwise it gives correct values.

I don't know whether I am missing out anything. Please help me out with this problem.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions