-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Description
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
Labels
No labels