Arduino · Intermediate · Stufe 15 / 40
I2C in Depth: Sharing Two Wires Among Many Chips
Understand I2C electrically and logically and talk to sensors, clocks and expanders at register level.
Intermediate freischalten · CHF 19.90 Stufen 14–26, einmalig, kein Abo
10 Lektionen in dieser Stufe
- I2C Bus Electricals: Open Drain, SDA, SCL and Pull-Ups
Explain why devices only pull lines low and how pull-up resistors set the high level. · Lab: Measure idle bus voltage and find the pull-ups already fitted on your modules. - Addresses, Start, Stop and ACK on the Logic Analyzer
Recognise the elements of a transaction in a capture. · Lab: Capture a bus scan and identify which address was acknowledged. - Wire Library Transactions: Writing and Reading Registers
Perform write, read and repeated-start sequences with the Wire library. · Lab: Read the identification register of a sensor and print it in hex. - Driving a Sensor from Its Register Map without a Library
Use a datasheet register table to configure and read a device yourself. · Lab: Wake an MPU-6050 and read raw acceleration with your own functions. - Tilt Angles from an MPU-6050 Accelerometer and Gyroscope
Convert raw values to angles and blend both sensors with a simple complementary filter. · Lab: Show pitch and roll and compare accelerometer-only with the filtered angle while shaking. - Pressure, Temperature and Altitude with a BME280
Read a calibrated environmental sensor and derive altitude change. · Lab: Measure the height difference between floor and table or between two storeys. - Keeping Time with a DS3231 Real-Time Clock
Set, read and use a battery-backed clock and its alarm output. · Lab: Set the clock, unplug the board for a minute and confirm time is kept. - More Pins with a PCF8574 Port Expander
Add inputs and outputs over the bus and understand quasi-bidirectional pins. · Lab: Drive four LEDs and read two buttons through the expander. - Address Conflicts and the TCA9548A Multiplexer
Resolve identical addresses with address jumpers or a bus multiplexer. · Lab: Run two identical OLED displays showing different content through the multiplexer. - Bus Speed, Cable Length and Recovering a Stuck Bus
Choose clock speed and pull-up values for a given wiring and free a bus held low. · Lab: Lengthen the bus until errors appear, then fix it with stronger pull-ups and lower speed.
Abschlussprojekt
A battery-backed clock and weather display combining real-time clock, pressure sensor, motion sensor and OLED on one bus.
Teile für diese Stufe
- 1 × UNO-compatible board
- 1 × USB cable matching the board
- 1 × Solderless breadboard 830 points
- 1 × Jumper wire set male-male and male-female
- 1 × USB logic analyzer 8 channel
- 1 × MPU-6050 accelerometer and gyroscope module
- 1 × BME280 pressure, humidity and temperature module
- 1 × DS3231 real-time clock module with battery
- 1 × PCF8574 port expander module
- 1 × TCA9548A I2C multiplexer module
- 2 × OLED display 0.96 inch I2C 128x64
- 4 × Resistor 4.7 kilohm
- 1 × Bidirectional logic level shifter module
- 4 × LED 5 mm assorted
- 4 × Resistor 220 ohm
- 2 × Tactile push button
In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Arduino-kompatibel →
Voraussetzung: Levels 1–14: logic analyzer use, level shifting, bitwise operations and classes.