Sketch freezes on Bridge.begin() with Arduino Yun

Hi,

I have the Arduino 1.5.7 with a Yun and trying to send an HTTP request. I can't get past the Bridge.begin(), the led remains HIGH indefinitely.

Source from: http://arduino.cc/en/Tutorial/HttpClient

#include <Bridge.h>
#include <HttpClient.h>

void setup()
{
	pinMode(13, OUTPUT);
	digitalWrite(13, HIGH);
	Bridge.begin();
	digitalWrite(13, LOW);
	Serial.begin(9600);
	while(!Serial);
}

void loop() {
  HttpClient client;
  client.get("http://arduino.cc/asciilogo.txt");

  while (client.available()) {
    char c = client.read();
    Serial.print(c);
  }
  Serial.flush();

  delay(5000);
}

Thanks for your help! :slight_smile:

It works now! :slight_smile:
I pressed the Wifi reset button for 30 seconds, un-replugged the USB, and suddenly it works...

	while(!Serial);

I bet 1 euro you were using the wifi port (with the IP address, not the serial COM or tty). while(!Serial); makes the sketch waiting for you to open the serial monitor. If you use wifi/network, you need to use Console instead of Serial