YUN with Ethernet

As i can not get the Yun to work with the company wifi i tried to plug in into the network with ethernet
The sketch belows works and downloads the text (“http://arduino.cc/asciilogo.txt”)

No I wanted to test if I can communicate with the Blynk server - any guidance whichg libraries to include?

I tried and included my auth code but the Blynk app states my Yun i soffline; maybe again a port challenge ?

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “YourAuthToken”;

Working ethernet sketch:

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

void setup() {
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
Bridge.begin();
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©;
}
Serial.flush();

delay(5000);
}

Please try “Arduino Yun”, not the “Arduino Ethernet” example sketch. On Yun it works with WiFi as well as Ethernet.

Note: Using such devices in a corporate network may be prohibited or even blocked, please consult your IT support.

1 Like