Arduino ethernet shield w5100 mrezni lan modul + sdcard
Dogovor
- 153045422
- Ažuriran: 31.01.2025.
- Šifra artikla: 3022
- arduino-ethernet-shield-w5100-mrezni-N3FpN
Izdvojene informacije
-
Novo/Nekorišćeno
Stanje
-
-
Opis
Opis proizvoda
Ethernet V5100 modul za proširenje mreže, može postati jednostavan Veb server ili mrežna kontrola za čitanje i pisanje digitalnog i analognog interfejsa i drugih mrežnih aplikacija. IDE se može koristiti direktno u datotekama Ethernet biblioteke može se postići jednostavnim Veb serverom.
U međuvremenu, verzija podržava čitač mini SD kartica (TF kartica).
Ploča za proširenje koristi dizajn koji se može slagati, može se direktno priključiti u , dok se naše druge ploče za proširenje takođe mogu priključiti.
Code:
/ *
* Web Server
*
* A simple web server that shows the value of the analog input pins.
* /#include
byte mac [] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
byte ip [] = {192, 168, 0, 15};Server server (80);
void setup ()
{
Ethernet. begin (mac, ip);
server. begin ();
}void loop ()
{
Client client = server. available ();
if (client) {
// An http request ends with a blank line
boolean current_line_is_blank = true;
while (client. connected ()) {
if (client. available ()) {
char c = client. read ();
// If we've gotten to the end of the line (received a newline
// Character) and the line is blank, the http request has ended,
// So we can send a reply
if (c == '\ n' &¤t_line_is_blank) {
// Send a standard http response header
client. println ( "HTTP / 1.1 200 OK");
client. println ( "Content-Type: text / html");
client. println ();
// Output the value of each analog input pin
client. print ( "welcome to tinyos");
client. println ( "
");
client. print ( "// *************************************");
client. println ( "
");
client. print (www. tinyos. net. cn);
client. println ( "
");
client. print ( "// *************************************");
client. println ( "
");
for (int i = 0; i
client. print ( "analog input");
client. print (i);
client. print ( "is");
client. print (analogRead (i));
client. println ( "
");
}
break;
}
if (c == '\ n') {
// We're starting a new line
current_line_is_blank = true;
} Else if (c! = '\ R') {
// We've gotten a character on the current line
current_line_is_blank = false;
}
}
}
client. stop ();
}
} -
Ukoliko su na ovom oglasu primećene neke greške ili nepravilnosti prijavi oglas
-
-
-
-