I have Arduino IDE v. 1.8.13.
I bought an ESP8266-01 module which I want to use in my Arduino-UNO board to send fingerprint registration confirmation (ID) via HttpClient to a xampp server since I dont want to store the fingerprint image in the database.
My ESP connection is as below:
In the serial monitor, my AT commands work well when I connect the module to my wifi using AT+CWJAP="ssid","password".
When I upload my code, which is supposed to connect to wifi, it says WiFi shield not present. Im new to this, is there anything I am missing? Thanks in advance.
Here is my code:
#include <ArduinoHttpClient.h>
#include <WiFi101.h>
#include "arduino_secrets.h"
char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;
char serverAddress[] = "localhost/bel/arduino/scannerstatus/php"; // server address
int port = 80;
WiFiClient wifi;
HttpClient client = HttpClient(wifi, serverAddress, port);
int status = WL_IDLE_STATUS;
void setup() {
Serial.begin(9600);
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to Network named: ");
Serial.println(ssid); // print the network name (SSID);
// Connect to WPA/WPA2 network:
status = WiFi.begin(ssid, pass);
}
Basically, my uploaded code does not go past the wifi connection stage. Even though the AT commands individually can connect to wifi. I have tried different ESP8266 libraries and HttpClient libraries but they all seem to not connect to wifi. Is there any other way to call a php script from arduino without using wifi?