1. Home
  2. /
  3. IOT 物聯網
  4. /
  5. Arduino
  6. /
  7. [ Arduino ] –...

[ Arduino ] – W5100 R3 網卡 設定 DNS / subnet / gateway

評等結果
點擊便能為這篇文章進行評等!
[評等總次數: 0,平均評等: 0]

[javascript]
#include <SPI.h>
#include <Ethernet.h>
static byte mac[] = {0xF0,0x7B,0x4B,0x7C,0x9F};
static byte ip[] = {192,168,0,1};
static byte dns1[] = {168,95,1,1};
static byte subnet[] = {255,255,255,0};
static byte gateway[] = {192,168,199,254};
void setup() {
Serial.begin(9600);
Ethernet.begin(mac, ip, dns1, gateway, subnet);
delay(1000);
Serial.println("connecting…");//輸出字串 連線中…
Serial.print("IP :");
Serial.println(Ethernet.localIP());//輸出取得的IP位置
}
void loop() {
}
[/javascript]

評等結果
點擊便能為這篇文章進行評等!
[評等總次數: 0,平均評等: 0]
!去下營經續永站本助幫能就下一點輕輕,話的您到助幫有章文的我果如 如果我的文章有幫助到您的話,輕輕點一下就能幫助本站永續經營下去!

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *