호환보드
제조사 | OEM |
---|---|
브랜드 | 에듀이노 |
판매가 | 17,000원 |
적립금 | 170원 |
자체상품코드 | B-12 |
상품요약정보 | 호환보드 |
국내·해외배송 | 국내배송 |
배송방법 | 택배 |
수량 |
COMMENT |
(최소주문수량 1개 이상 / 최대주문수량 0개 이하)
사이즈 가이드현재 상품과 관련된 상품들입니다. 함께 구매해보세요^^
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | #include <SPI.h> #include <Ethernet.h> // Enter a MAC address for your controller below. // Newer Ethernet shields have a MAC address printed on a sticker on the shield byte mac[] = { 0x74,0x69,0x69,0x2D,0x30,0x5}; // Initialize the Ethernet client library // with the IP address and port of the server // that you want to connect to (port 80 is default for HTTP): EthernetClient client; void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); // this check is only needed on the Leonardo: while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } // start the Ethernet connection: if (Ethernet.begin(mac) == 0) { Serial.println("Failed to configure Ethernet using DHCP"); // no point in carrying on, so do nothing forevermore: for (;;) ; } // print your local IP address: printIPAddress(); } void loop() { switch (Ethernet.maintain()) { case 1: //renewed fail Serial.println("Error: renewed fail"); break; case 2: //renewed success Serial.println("Renewed success"); //print your local IP address: printIPAddress(); break; case 3: //rebind fail Serial.println("Error: rebind fail"); break; case 4: //rebind success Serial.println("Rebind success"); //print your local IP address: printIPAddress(); break; default: //nothing happened break; } } void printIPAddress() { Serial.print("My IP address: "); for (byte thisByte = 0; thisByte < 4; thisByte++) { // print the value of each byte of the IP address: Serial.print(Ethernet.localIP()[thisByte], DEC); Serial.print("."); } Serial.println(); } | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | #include <DHT.h> #define DHTPIN A2 #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); #include <Wire.h> #include <SPI.h> #include <Ethernet.h> byte mac[] = { 0x74, 0x69, 0x69, 0x2D, 0x30, 0x5}; IPAddress ip(DHCP IP주소 찾기 예제 검색 후 아이피주소 입력); // IP 주소는 " XXX,XXX,XXX,XXX " ',' 주의해주세요. // 이더넷 라이브러리 초기화 // 사용할 IP 주소 와 포트 입력 // ('port 80' 은 HTTP 의 기본 값 입니다.): EthernetServer server(80); void client(); void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // 포트 연결까지 기다리기. 레오나르도에만 필요합니다. } // 이더넷 서버 연결 시작: Ethernet.begin(mac, ip); server.begin(); Serial.print("server is at "); Serial.println(Ethernet.localIP()); } void loop() { EthernetClient client = server.available(); if (client) { Serial.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connnection: close"); client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); // 브라우저 5초마다 새로고침 client.println("<meta http-equiv="refresh" content="5">"); client.println("<title>"); client.print("Welcome EDUINO"); client.println("</title>"); int h = dht.readHumidity(); int t = dht. readTemperature(); // 온습도센서(DHT-11)로부터 값 출력 client.println("<center>"); client.println("<h1>"); client.print("EDUINO Office"); client.println("</h1>"); client.println("<h2>"); client.print("Office Temperature and Humidity"); client.println("</h2>"); client.println("<h4>"); client.print("Temperature : "); client.print(t); client.print("<sup>0</sup>"); client.print("C"); client.println("<br />"); client.print("Humidity : "); client.print(h); client.print("%"); client.println("</h4>"); client.println("</center>"); client.println("</html>"); break; } if (c == '\n') { currentLineIsBlank = true; } else if (c != '\r') { currentLineIsBlank = false; } } } //브라우저 데이터 받는 시간 delay(1); //연결 종료: client.stop(); Serial.println("client disonnected"); } } | cs |
상품의 사용후기를 작성해주세요.
글읽기 권한이 없습니다.
"19세 미만의 미성년자"는 출입을 금합니다!
no | photo | title | write | date | hit | point |
---|---|---|---|---|---|---|
10 |
빠른 배송 감사요 |
현**** | 2017-10-12 | 476 | ||
9 |
잘 쓸꼐요~감사!! |
진**** | 2017-08-02 | 458 | ||
8 |
빠른 배송 굿굿굿!!! |
현**** | 2017-07-18 | 436 | ||
7 |
정품은 너무 비싸서 ㅠ |
김**** | 2017-05-16 | 552 | ||
6 |
가격이 너무 싸서 걱정했는데 |
오**** | 2017-05-06 | 570 |
상품에 대해 궁금한 점을 해결해 드립니다.
글읽기 권한이 없습니다.
"19세 미만의 미성년자"는 출입을 금합니다!
no | category | title | write | date | hit |
---|---|---|---|---|---|
24 | d1 r2 에서 이더넷 쉴드 사용법 [1] | 함인정 | 2022-09-02 | 508 | |
23 | esp8266에 w5100 장착시 이더넷안됨 [1] | 함인정 | 2022-09-01 | 357 | |
22 | 기능문의 [1] | 이아칠 | 2022-07-08 | 232 | |
21 | 이더넷 사용 질문 [1] | 이상협 | 2022-06-27 | 266 | |
20 | 문의드립니다. [1] | 97837005@n | 2022-05-17 | 123 |