loading
2Comments

Tell us about yourself!

Complete Your Profile
  • PART 1 - Send Arduino data to the Web ( PHP/ MySQL/ D3.js )

    Following is my code. I'm not using any sensors. Just trying to send the value to the server. PHP codes are ok. But nothing added to the DB. Nothing printed on the Serial port as well.#include <Ethernet.h>#include <SPI.h>byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };byte ip[] = { 192,168,1,5}; //The Arduino device IP addressbyte subnet[] = { 255,255,255,0};byte gateway[] = { 192,168,0,1};IPAddress server(192,168,1,2);EthernetClient client;String data;void setup() { Serial.begin(9600); // start the Ethernet connection: while (!Serial); if (Ethernet.begin(mac) == 0) { Serial.println("Failed to configure Ethernet using DHCP"); for (;;) ; } Serial.print("My IP address: "); for (byte thisByte = 0; thisByte < 4; thisByte++) { Serial.p...see more »Following is my code. I'm not using any sensors. Just trying to send the value to the server. PHP codes are ok. But nothing added to the DB. Nothing printed on the Serial port as well.#include <Ethernet.h>#include <SPI.h>byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };byte ip[] = { 192,168,1,5}; //The Arduino device IP addressbyte subnet[] = { 255,255,255,0};byte gateway[] = { 192,168,0,1};IPAddress server(192,168,1,2);EthernetClient client;String data;void setup() { Serial.begin(9600); // start the Ethernet connection: while (!Serial); if (Ethernet.begin(mac) == 0) { Serial.println("Failed to configure Ethernet using DHCP"); for (;;) ; } Serial.print("My IP address: "); for (byte thisByte = 0; thisByte < 4; thisByte++) { Serial.print(Ethernet.localIP()[thisByte], DEC); Serial.print("."); } delay(4000); // GIVE THE SENSOR SOME TIME TO START data = "";}void loop(){ data = "&temp1=10&hum1=20"; if (client.connect(server,1234)) { // REPLACE WITH YOUR SERVER ADDRESS Serial.println("Server connection OK"); client.println("POST /add.php HTTP/1.1"); client.println("Host:" + server);// SERVER ADDRESS HERE TOO client.println("Content-Type: application/x-www-form-urlencoded"); client.print("Content-Length: "); client.println(data.length()); client.println(); client.print(data); } if (client.connected()) { client.stop();// DISCONNECT FROM THE SERVER } delay(5000); // WAIT FIVE MINUTES BEFORE SENDING AGAIN}

    View Instructable »
  • PART 1 - Send Arduino data to the Web ( PHP/ MySQL/ D3.js )

    Hello,I'm doing a project with RFID-RC522, for that I need PORTS 5,50,51,52,53,GND,3.3v. Will they be still usable if I use the mentioned Ethernet shield ?

    View Instructable »