[Ethernet]
説明
Obtains the MAC (Media access control) address of the 86Duino. This function is available from 86Duino Coding 102.
構文
Ethernet.localMAC();
媒介変数
none
戻り値
an array of 6 bytes that contains the MAC address of the 86Duino
例
#include <Ethernet.h>
void setup() {
// start the serial library:
Serial.begin(9600);
// start the Ethernet connection:
if (Ethernet.begin() == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
for(;;)
;
}
// print your MAC address:
byte *mac = Ethernet.localMAC();
for (int i=0; i<6; i++)
{
Serial.print(mac[i], HEX);
Serial.print(" ");
}
}
void loop() {
}ライブラリリファレンスホーム
86Duinoリファレンスのテキストは、Arduinoリファレンスを改変したもので、Creative Commons Attribution-ShareAlike 3.0ライセンスに基づいてライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。