Closed amjrazman closed 6 years ago
this is the issues page for the Adafruit-GFX-library. Your code does not even include that library, so I'm pretty certain that you're asking the wrong people.
kind regards
pj
yeah, it's not an issue with the GFX-library, you must have a problem with your ESP32.
make sure your wifi network is up and running, and restart your esp a bunch of times if it doesnt connect -- on my board the wifi works after 5 reboots or something.
good luck!
@ladyada I think this is a candidate for closing, too.
thanks!
Hi .
Im using ESP32 for the module. I want to connect it with wifi. however , on serial monitor it shows (connecting .............................) till forever. I wait for hours tho i believe it will connect somehow. Anyway im using MacBook Pro, run with El Capitan OSX.
Below is the code:
`#include
char ssid = "ooooooooo";
const char password = "xxxxxxxxxx";
WiFiServer server(80);
/MLX90614 Sensor /
include
include
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup() { Serial.begin(115200); delay(10); Serial.println("Adafruit MLX90614 test");
//pinMode(21,INPUT) //adc1_config_width(ADC_WIDTH_10Bit); // adc1_config_channel_atten(ADC1_CHANNEL_5,ADC_ATTEN_11db); // duration=1000*10; //time1=0; mlx.begin();
connectWiFi(); }
void loop() { WiFiLocalWebPageCtrl(); / Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC()); Serial.print("C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("C"); Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF()); Serial.print("F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");
Serial.println(); delay(500); */ }
/***
Send and receive data from Local Page ****/ void WiFiLocalWebPageCtrl(void) { WiFiClient client = server.available(); // listen for incoming clients //client = server.available(); if (client) { // if you get a client, Serial.println("New Client."); // print a message out the serial port String currentLine = ""; // make a String to hold incoming data from the client while (client.connected()) { // loop while the client's connected if (client.available()) { // if there's bytes to read from the client, char c = client.read(); // read a byte, then Serial.write(c); // print it out the serial monitor if (c == '\n') { // if the byte is a newline character
/ // Check to see if the client request was "GET /H" or "GET /L": if (currentLine.endsWith("GET /H")) { digitalWrite(LED_PIN, HIGH); // GET /H turns the LED on } if (currentLine.endsWith("GET /L")) { digitalWrite(LED_PIN, LOW); // GET /L turns the LED off }/ } } // close the connection: client.stop(); Serial.println("Client Disconnected."); } }
/***
Connecting to a WiFi network **/ void connectWiFi(void) { Serial.println(); Serial.println(); Serial.print("Connecting to "); Serial.println(ssid); // if(WiFi.getAutoReconnect()) { WiFi.disconnect(); WiFi.begin(ssid, password); // } //else //{ //WiFiSTAClass::_setStatus(WL_CONNECT_FAILED) //} while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected."); Serial.println("IP address: "); Serial.println(WiFi.localIP());
//delay(5000); server.begin(); } `****