() 해외배송 가능
판매가 | |
---|---|
소비자가 | 0원 |
적립금 |
|
무이자할부 | |
제조사 | 자체제작 |
원산지 | |
상품코드 | P0000JQM |
수량 | |
국내/해외배송 | |
SNS 상품홍보 | |
QR코드 | |
QR코드 보내기 |
본 제품은 아두이노용 이더넷 쉴드로 W5100 이더넷 컨트롤러칩을 탑재한 제품입니다.
아두이노에 적재하여 쉽게 이더넷에 연결할 수 있습니다.
microSD 소켓을 장착하였으며, 3.3V/5V를 지원합니다.
POE 기능을 지원합니다.
Compatible Mainboard : Leaf maple
Arduino Deumlanove/UNO
Arduino MEGA
ChipKit MAX32
ChipKit UNO32
FEZ Panda II
Freeduino
Iteadmaple
Iteaduino
Iteaduino ADK
Iteaduino BT
Iteaduino MEGA 2560
Seeeduino
Seeduino MEGA
Shield Functions : Ethernet
Board Size : 55.88mm x 68.58mm
Operation Level : Digital 3.3V
Digital 5V
Weight : 40g
예제코드
#include <SPI.h>
/*
* Web Server
*
* A simple web server that shows the value of the analog input pins.
*/
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 15 };
EthernetServer server(80);
void setup()
{
Ethernet.begin(mac, ip);
server.begin();
}
void loop()
{
EthernetClient 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' && current_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 electronics");
client.println("<br />");
client.print("//*************************************");
client.println("<br />");
client.print("");
client.println("<br />");
client.print("//*************************************");
client.println("<br />");
for (int i = 0; i < 6; i++) {
client.print("analog input ");
client.print(i);
client.print(" is ");
client.print(analogRead(i));
client.println("<br />");
}
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();
}
}