Loading the figure…
Stopped · Your code isn't running yet. Until you press Run, the board runs the program already on it.
Nothing printed yet. Press Run.
Not checked yet
Run your code to check it. The checks replay a fixed script on a virtual clock, so the same code always gets the same result.
Each fault really happens in the simulation. Trigger one, watch the figure, then read why.
Play the world: press, slide and turn the parts while the code runs.
Change a value here or click a chip in the code.
I2C is a two-wire bus: SDA on A4 carries data, SCL on A5 the clock, and every device has an address. Scan the bus, find the MPU-6050 at 0x68, then ask it who it is.
| Pin | Connects to | What it does |
|---|---|---|
A4 | SDA | I2C data. |
A5 | SCL | I2C clock. |
5V | VCC | Powers the breakout. |
GND | GND | Common ground. |
Sensors and actuators this board drives, with the real connections.
GY-521 breakout with an MPU-6050 at I2C address 0x68 (0x69 with AD0 high). Its own regulator lets it run from 5V; SDA goes to A4 and SCL to A5.
| Part pin | Board pin |
|---|---|
| VCC | 5VWire colour red |
| GND | GNDWire colour black |
| SCL | A5Wire colour yellow |
| SDA | A4Wire colour blue |
The chip itself is 3.3 V. The breakout pulls SDA and SCL up to its 3.3 V, and Wire.begin() also turns on the 328P's weak pull-ups to 5 V, so the bus idles a little above 3.3 V. It works in practice; a level shifter is the clean fix.
0.96 in 128 × 64 OLED at I2C address 0x3C, on A4 (SDA) and A5 (SCL).
| Part pin | Board pin |
|---|---|
| GND | GNDWire colour black |
| VCC | 5VWire colour red |
| SCL | A5Wire colour yellow |
| SDA | A4Wire colour blue |
Read the pin order on the silk: some modules are GND VCC, others VCC GND, and swapping them kills the display. Its 1 KB frame buffer takes half the Nano's RAM, so keep text in flash with F("...").