HP Procurve Switch 2626 configure trunk Commands: menu first: create trunk Second: setup trunk vlan's.
Aruino+ENC28J60
Home Automation : Controlling Home Appliance Thru Internet using Arduino + ENC28J60 Ethernet Module. For more details about the project please visit this ...
LabMinutes# RS0005 - Cisco Router and Switch Recommended Startup Configuration
more at //www.labminutes.com The video provides recommended router startup configurations (majority also applies to a Catalyst switch) that will tighten ...
Prototype Wireless Switch - ESP8266
Wireless Switch - ESP8266-01.... with socket added.
The Code...
#include
const char* ssid = "*********";
const char* password = "*********";
IPAddress ip(192,168,1,198);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);
int value = LOW;
int value2 = LOW;
int ppin =0;
int ledPin1 = 0; // GPIO2
int ledPin2 = 2;
WiFiServer server(80);
void setup() {
Serial.begin(115200);
delay(10);
pinMode(ledPin1, OUTPUT);
digitalWrite(ledPin1, LOW);
pinMode(ledPin2, OUTPUT);
digitalWrite(ledPin2, LOW);
// Connect to WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
WiFi.config(ip, gateway, subnet);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
// Start the server
server.begin();
Serial.println("Server started");
// Print the IP address
Serial.print("Use this URL to connect: ");
Serial.print("//");
Serial.print(WiFi.localIP());
Serial.println("/");
}
void loop() {
// Check if a client has connected
WiFiClient client = server.available();
if (!client) {
return;
}
// Wait until the client sends some data
Serial.println("new client");
while(!client.available()){
delay(1);
}
// Read the first line of the request
String request = client.readStringUntil('\r');
Serial.println(request);
client.flush();
// Match the request
if (request.indexOf("/LED1=ON") != -1) {
digitalWrite(ledPin1, HIGH);
value = HIGH;
ppin = 1;
}
if (request.indexOf("/LED1=OFF") != -1){
digitalWrite(ledPin1, LOW);
value = LOW;
ppin = 1;
}
if (request.indexOf("/LED2=ON") != -1) {
digitalWrite(ledPin2, HIGH);
value2 = HIGH;
ppin=2;
}
if (request.indexOf("/LED2=OFF") != -1){
digitalWrite(ledPin2, LOW);
value2 = LOW;
ppin=2;
}
// Set ledPin according to the request
//digitalWrite(ledPin, value);
// Return the response
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println(""); // do not forget this one
client.println("");
client.println("");
client.print("Led pin1 is now: ");
if(value == HIGH) {
client.println("On . ");
} else {
client.println("Off . ");
}
client.print("Led pin2 is now: ");
if(value2 == HIGH) {
client.print("On");
} else {
client.print("Off");
}
client.println("");
client.println("Click here turn the LED on pin 1
ON");
client.println("Click here turn the LED on pin 1
OFF");
client.println("Click here turn the LED on pin 2
ON");
client.println("Click here turn the LED on pin 2
OFF");
client.println("");
delay(1);
Serial.println("Client disonnected");
Serial.println("");
}
smart home project control through internet using wifi module
Home Appliances control through internet (world wide) from website ,In this project four appliances is controlled (fan,light bulb,curtain closer/opener Sprinkler).
How to connect the ENC28J60 to an Arduino - [Anything Arduino] (ep1)
This video tutorial discusses some differences between the W5100 (Ethershield) and the ENC28J60. I will show you how to connect the ENC28J60 to the ...
Hello Kristian,
great job. These tutorial help me to start LAN connection. Before I waste a
lot of time by using 3.3 V supply. One hint from my side. LAN card works
only in following way: 1. Start Arduino, 2. start LAN adapter. If I start
both at same time it dosen't work. And by the way my power on LED from
adatper is red. That makes me a little bit nerveos. Thanks for help
+Uwe Ri_ I think that the color of the led is depending on manufacturer, and manufacturing date? I have had other people saying the same thing. Interesting that it only works if you start in that order. It sure makes it a bit more tricky when creating something useful with this. I'll have a look at that the next time I work with the ENC28J60 if I have the same problem.
+vito scall Oh! You try to connect the Arduino/ENC28J60 directly to the computer!? Short answer: That wont work. Longish answer: Ethernet cables are "twisted". This means that with a twisted pair cable you can connect a host to a switch or router etc, but not toghether to each other. You need a straight cable to connect a host to a host and create a host-to-host network. Search the web for host to host ethernet cable or crossover ethernet cable and you should find a connection diagram for making one of those cables.
+Kristian Blåsol When I connect the arduino directly to the Ethernet port of the router its working perfectly. Although it doesn't work from the Ethernet port of my laptop. I have no idea why.
+vito scall If you have a 3.3V regulator on the board then you should power it with 5V. If it blinks and reacts to network traffic then the board most likely works. So still the cabling and code that has to be checked. What version of the Arduino IDE do you use? You could try with an older version. I use 1.0.5r2 when doing this project. That could matter.
+Kristian Blåsol The leds are blinking for the first 3 minutes then only the green is on. I tried with both 3.3V and 5V power supply and also the board has an 3.3 Voltage regulator. The code is exactly the same as the an example with the only difference the static 1 and ip gw values.
+vito scall Ok, "good"... :) Then you need to check your ENC module. Does it react to traffic on the network? Does the leds blink. What voltage do you use to run it? Does it have a 3.3 Voltage regulator chip somewhere on the board? Check all cables one more time. Make sure your code is correct.
+Kristian Blåsol With ping I get (with and without arduino connection) 192.168.0.180 with 32 bytes of data:Reply from 192.168.0.5: Destination host unreachable.
It doesnt matter. You only need the dns if you want to surf the web or use dns names. But when you only work with ip-addresses it isnt needed. Unplug the arduino and ping the ip-address. Make sure you dont get an answer. Then plug the arduino in and ping again. Do you get an answer then? If not then something is wrong in the sketch or in the cabling...
+vito scall Unsure what you mean? If you mean that you get dns: 0.0.0.0 maybe it is because it was defined in the sketch I made? Does it work for you or do you get an error? Have you made sure you are on the same "subnet", meaning that the computer that you use to surf to the arduino has a range with the same three first numbers... eg. 192.168.0.... If not you will have to change the sketch to match your network.