Estou com o seguinte problema, não estou conseguindo fazer a conexão do ethernet shield com o MySQL, estou seguinto o seguinte tutorial: https://goo.gl/Q5RRRC
Na parte de colocar os dados tenho 2 dúvidas:
#include "SPI.h"
#include "Ethernet.h"
#include "sha1.h"
#include "mysql.h"
/* Setup for Ethernet Library /
byte mac_addr[] = { 0x, 0x, 0x, 0x, 0x, 0x };
IPAddress server_addr(127, 0, 0, 1);
/ Setup
for the Connector/Arduino */
Connector my_conn; // The Connector/Arduino reference
char user[] = "root";
char password[] = "teste";
void setup() {
Ethernet.begin(mac_addr);
Serial.begin(115200);
while (!Serial);
delay(1000);
Serial.println("Connecting...");
if (my_conn.mysql_connect(server_addr, 3306, user, password)){
Serial.println("Success!");
} else {
Serial.println("Connection failed.");
}
}
void loop() {
}
byte mac_addr[] = { 0x, 0x, 0x, 0x, 0x, 0x } << No Ethernet Shield possui um código é esse o código que eu coloco aqui? É um endereço de 6 posições
IPAddress server_addr = É o endereço do servidor do Mysql? eu uso o localhost é (127.0.0.1)?