国产精品成人一区二区三区-精品久久久久久久免费人妻-亚洲色精品aⅴ一区区三区-国产在线aaa片一区二区99

ARDUINO Ethernet W5100 網絡擴展板 SD卡擴展 MEGA

批發數量
梯度價格
型號
W5100
品牌
Ethernet W5100
類型
穩壓IC
功率
網絡擴展板
用途
儀器
封裝
網絡擴展板
批號
2014+

Arduino Ethernet  W5100網絡擴展模塊,可以使Arduino成為簡單的Web服務器或者通過網絡控制讀寫Arduino的數字和模擬接口等網絡應用。可直接使用IDE中的Ethernet庫文件便可實現一個簡單Web服務器。

 

    同時該版本的支持mini SD卡(TF卡)讀寫

 

該擴展板采用了可堆疊的設計,可直接插到Arduino上,同時我們的其他擴展板也可以插上去。

 

代碼:

 

/*

 * 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\' && 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");

          client.println("

");

          client.print("//*************************************");

          client.println("

");

          client.print(www.tinyos.net.cn);

          client.println("

");

          client.print("//*************************************");

          client.println("

");

          for (int i = 0; i < 6; 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();

  }

}

 




 泓勝達電子實體經營.
電話:0755-83228515  15814009008  陳生  
微信:hosenta
QQ:137057855
http:// www.hosenta.cn


 



精品推薦!!





SIM800L GPRS TCP IP 模塊 自彈卡槽 microSIM卡 GSM 短信 超900A

RMB 58.00







GSM報警器 GSM模塊單片機 通電上電觸發 STM8+M590 GSM單片機控制

RMB 88.00







GSM模塊 SIM900A 全網最小板 短信 GPRS 電話 通訊 IPEX座

RMB 52.00







GSM 短信 GPRS 通訊 自彈卡槽 SIM900A 模塊 轉接 全網最小體積

RMB 53.50







GSM SIM 模塊 改串號IMEI LBS定位 GPRS 自動接聽 支持四種頻率

RMB 75.50







SIM900 SIM900A GPRS模塊 GSM 開發板 工業級 帶DTMF 彩信 定位

RMB 128.00







分段IC JY2608 DIP8 SOP8

RMB 0.45







無線影聲傳輸芯片 RTC6721

RMB 8.50







2.4G模擬無線AV發射芯片 RTC6701 RTC6711

RMB 4.95







鋰電池串聯的保護IC SH367003 SH367003X-BBA

RMB 3.00







多節鋰電池串聯的保護IC SH367003X-AAN SH367003X-AAV

RMB 3.00







3節/4節鋰電池串聯的保護IC SH367003 SH367003X-AAF

RMB 3.00







3-4節充電平衡保護IC SH367004 SH367004X-AAB

RMB 6.50







MOS場效應管 AO4704 AO4812 AO4407 AO4407A AO4407

RMB 0.95







QY3081 QY3081A DIP8 LED同步七彩控制IC 全新原裝

RMB 2.00







DC-DC降壓IC D1067 D1067A D1067B 實體店優勢供應

RMB 0.75







CX8508 CX8505 2A 3A 系列 降壓IC 車充方案 安防方案IC

RMB 0.75







佰立微BM降壓IC BM1410 BM1410A 原裝正品 泓勝達電子

RMB 0.60







WILLSEMI 充電IC WS4502E-5/TR WS4502E WS4502 4502 品質保證!

RMB 0.65







CRE8268 TSSOP24 三合一移動電源IC 全新低價 現貨

RMB 3.50







移動電源五合一芯片 TP4213 香水口紅管專用 移動電源主控IC

RMB 0.75







移動電源主控芯片 TP4201B TP4201A TP4201C TP4201三合一芯片

RMB 2.50







移動電源5合1芯片 TP4211 TP4211C TP4211BF 優質優價

RMB 2.00







5合1移動電源單芯片 TP4202A TP4202 TP4202B

RMB 2.30