Hi,
Since 1 week, i'm looking for a simple code, but every time, too difficult to understand. Maybe you can help me.
I have a mysql database. With some value.
I wan't take one of them, and put it in a value arduino.
Simple no? Not really...
I use an ethernet shield. My code start like this:
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0xF9, 0x6D };
IPAddress ip(192,168,1,89);
EthernetServer server(80);
void setup() {
// Open serial communications and wait for port to open
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
// start the Ethernet connection and the server:
Ethernet.begin(mac, ip);
server.begin();
}
My aim is: connect to my database (on OVH webserver)
Use a sentence like in php "SELECT name FROM listname WHERE id=1"
and put this value une an arduino value.
Somebody have an exemple of simple code like this to help me?
Thank you very much for this!