Website opennen met arduino

algemene C code
Berichten: 5
Geregistreerd: 21 Okt 2014, 15:45

Website opennen met arduino

Berichtdoor s-man » 22 Okt 2014, 15:32

Beste,

ik zou graag via mijn arduino een php insert plaatsen op mijn website.
Als ik op de button duw dat deze de pagina opent http://mijnwebsite.nl/arduino-insert.php?ip= en dan het ip van mijn arduino

Is dit mogelijk hopelijk kunnen jullie me hier bij helpen.

Alvast dank

Code: Alles selecteren
#include <SPI.h>
#include <Ethernet.h>


// the media access control (ethernet hardware) address for the shield:
byte mac[] = { 0x90, 0xA2, 0xDA, 0x07, 0x00, 0x2B };
//the IP address for the shield:
byte ip[] = { 10, 25, 32, 80 };   

const int buttonPin = 2;     // the number of the pushbutton pin

void setup()
{
  Ethernet.begin(mac, ip);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}

void loop () {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {   
   // if code ---------- Hier de website ping
  }
  else {
// else
  }
}

Advertisement

Gebruikers-avatar
Berichten: 5043
Geregistreerd: 13 Mei 2013, 20:57
Woonplaats: Heemskerk

Re: Website opennen met arduino

Berichtdoor nicoverduin » 22 Okt 2014, 17:17

wel eens van google gehoord? In feite is dit een ethernet client.
Docent HBO Technische Informatica, Embedded ontwikkelaar & elektronicus
http://www.verelec.nl

Terug naar C code

Wie is er online?

Gebruikers in dit forum: Geen geregistreerde gebruikers en 3 gasten