ESP32 connect to mysql database
Posted: Sun Mar 11, 2018 8:57 pm
Hallo,
i'm new her. I can`t find a solution for my problem. I use a esp8266 with the esp8266wifi.h and the mysql_connection.h and mysql_coursor.h in my scripts.
And now i want make the same with the esp32, but donsn`t work. I can`t include the wifi.h and the two classes from mysql_ .
He set a exception
Anyone can help me?
i'm new her. I can`t find a solution for my problem. I use a esp8266 with the esp8266wifi.h and the mysql_connection.h and mysql_coursor.h in my scripts.
And now i want make the same with the esp32, but donsn`t work. I can`t include the wifi.h and the two classes from mysql_ .
He set a exception
the sketch for this:Arduino: 1.8.5 (Windows 10), Board: "ESP32 Dev Module, QIO, 80MHz, 4MB (32Mb), 921600, None"
Arduino\libraries\MySQL_Connector_Arduino-master\src\old\MySQL_Connection.cpp: In member function 'boolean MySQL_Connection::connect(IPAddress, int, char*, char*)':
\Arduino\libraries\MySQL_Connector_Arduino-master\src\old\MySQL_Connection.cpp:74:25: error: 'check_ok_packet' was not declared in this scope
if (check_ok_packet() != 0) {
^
Code: Select all
// LOAD CLASSES
#include "time.h"
#include <TimeAlarms.h>
#include <MySQL_Connection.h>
#include <MySQL_Cursor.h>
#include <WiFi.h>
//LOAD CONFIGRATION
#include "default.h"
#include "setup.h"
#include "db.h"
WiFiServer server(80);
void setup(){
//DEFINE IO's
pinMode(ACTIV_LED, OUTPUT);
pinMode(ACTION_LINE1, INPUT);
pinMode(ACTION_LINE2, INPUT);
pinMode(ACTION_LINE3, INPUT);
pinMode(ACTION_LINE4, INPUT);
pinMode(ACTIVELINE1, OUTPUT);
pinMode(ACTIVELINE2, OUTPUT);
pinMode(ACTIVELINE3, OUTPUT);
pinMode(ACTIVELINE4, OUTPUT);
pinMode(ALARM_ACTIV, OUTPUT);
//ACTIVATE SERIAL MONITORING
Serial.begin(115200);
delay(10);
Serial.println("setup - ok");
Serial.println("connect to the network... ");
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
delay(2000);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println(" connection established !");
Serial.println("\n read timestamp from ntpServer ...");
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
printLocalTime();
getConfiguration();
}
void loop(){
}