I2Cが2本の線で通信する仕組み
SDA、SCL、デバイスアドレスについて学びます。
「I2Cが2本の線で通信する仕組み」はCoddyKit上の無料Arduino & IoT Academyレッスンです。 これはレッスン1/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはArduino & IoT Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Arduino & IoT Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
Two Wires, Many Devices
I2C lets many chips share just two wires, so you can add sensors and screens without running out of pins. 🔌
Meet SDA and SCL
I2C uses two lines: SDA carries the data, and SCL carries the clock pulses that keep both sides perfectly in step.
The Clock Keeps Time
The SCL clock line ticks like a metronome. Every tick tells devices exactly when to read the next bit on the data line.
Master and Slaves
Your Arduino is the master: it starts every conversation. Sensors and displays are slaves that only answer when called.
Every Device Has an Address
Each chip on the bus owns a unique address, usually a 7-bit number. The master uses it to talk to exactly one device. 📬
How a Message Begins
The master sends a start signal, then the target address. The matching device replies, and the rest stay quiet on the shared lines.
Pull-Up Resistors Are Required
I2C lines need pull-up resistors to 3.3V or 5V. Without them the bus floats and your devices simply will not respond.
Boards on the Uno
On an Arduino Uno, SDA is pin A4 and SCL is pin A5. Many breakout boards include their own pull-ups already.
The Wire Library
Arduino talks I2C through the built-in Wire library. One include line gives you everything you need to start communicating.
#include <Wire.h>Begin the Bus
Call Wire.begin() in setup to join the bus as master. After that you can send to any device by its address.
void setup() {
Wire.begin();
}Why I2C Wins
Because devices share two lines, I2C keeps wiring simple and your pins free. That is why so many modules use it.
Quick Check
Which two lines does I2C use to communicate?
Recap
You learned that I2C shares two wires, SDA and SCL, with a master, addressed slaves, and pull-ups. Two wires, many devices. ✅
よくある質問
「I2Cが2本の線で通信する仕組み」レッスンは無料ですか?
はい。「I2Cが2本の線で通信する仕組み」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Arduino & IoT Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Arduino & IoT Academyコースには全4レッスンが含まれています。
「I2Cが2本の線で通信する仕組み」で何を学びますか?
SDA、SCL、デバイスアドレスについて学びます。 ブラウザで直接実行するハンズオンコードでArduino & IoT Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Arduino & IoT Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのArduino & IoT Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン1/4です。
「I2Cが2本の線で通信する仕組み」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このArduino & IoT Academyレッスンでコードを書いて実行できますか?
はい。すべてのArduino & IoT Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- I2Cが2本の線で通信する仕組み
- I2Cアドレスをスキャンする
- SPIが高速にデータを送る仕組み
- 1つのバスで複数のデバイスを動かす