LoginSignup
7
1

More than 3 years have passed since last update.

Arduinoでお手軽LANケーブルチェッカー

Last updated at Posted at 2019-12-08

はじめに

日本Androidの会秋葉原支部ロボット部 Advent Calendar 2019 9日目です。

LANケーブルを作ったときにちゃんと導通してるかチェックが必要ですよね。
Amazonで以下のチェッカーを購入したのですが、LEDのライトが弱いのかよくわかりません... :weary::weary:

LANケーブル自体もしょせんは銅線、Arduinoで簡易器具を作ってみました。

作り方

材料はaitendoで買ってきたRJ45コネクタ基板、あとは家にあった中華製promicro、LEDと抵抗です。

ブレットボードを2つ横に並べて写真のように材料をすべて平行に挿します。
中華製promicroに以下のスケッチを書いたら簡単チェッカーの出来上がりです。

LAN_Checker.ino

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  for (int i=2; i <= 9; i++){
    pinMode(i, OUTPUT);
  }
}

// the loop function runs over and over again forever
void loop() {
  for (int i=2; i <= 9; i++){
      digitalWrite(i, HIGH);
  }
}

これでどんどんLANケーブルを作っても安心です :muscle:

7
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
1