Hello all,
I'm trying to make the http://arduino.cc/en/Tutorial/HttpClient example to work.
Of cause I have done the http://arduino.cc/en/Guide/ArduinoYun#toc13 instructions.
There is no reaction what so ever.
I have modified the Sketch to see if the initialization works, and we seem to get past it.
I see "Here we go......." on my serial monitor after a few seconds, but than all keeps still.......
Tried to use the ip-addres in stead of the url, but that did not help either.
Tried other websites....... No go.............
What can I do to make this work please?
Friendly greetings
Rens
/*
Yun HTTP Client
This example for the Arduino Yún shows how create a basic
HTTP client that connects to the internet and downloads
content. In this case, you'll connect to the Arduino
website and download a version of the logo as ASCII text.
created by Tom igoe
May 2013
This example code is in the public domain.
http://arduino.cc/en/Tutorial/HttpClient
*/
#include <Bridge.h>
#include <HttpClient.h>
void setup() {
// Bridge takes about two seconds to start up
// it can be helpful to use the on-board LED
// as an indicator for when it has initialized
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
Bridge.begin();
digitalWrite(13, HIGH);
Serial.begin(9600);
while(!Serial); // wait for a serial connection
delay(4000); // Give the user time to open the serial monitor
Serial.println("Here we go.......");
}
void loop() {
// Initialize the client library
HttpClient client;
// Make a HTTP request:
client.get("174.129.243.245/asciilogo.txt");
// client.get("http://arduino.cc/asciilogo.txt");
// if there are incoming bytes available
// from the server, read them and print them:
while (client.available()) {
char c = client.read();
Serial.print(c);
}
Serial.flush();
delay(5000);
}