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.
Scan the I2C bus, wake the MPU-6050 and read its accelerometer register by register: no library, just the protocol.
| Pin | Connects to | What it does |
|---|---|---|
GP4 | MPU-6050 SDA | I2C0 data |
GP5 | MPU-6050 SCL | I2C0 clock |
3V3 | MPU-6050 VCC | 3.3 V supply |
GND | MPU-6050 GND | Return |
Sensors and actuators this board drives, with the real connections.
A GY-521 MPU-6050 breakout on I2C0: SDA to GP4, SCL to GP5, VCC to 3V3. Its address is 0x68 (0x69 with AD0 high).
| Part pin | Board pin |
|---|---|
| VCC | 3V3Wire colour red |
| GND | GNDWire colour black |
| SCL | GP5Wire colour yellow |
| SDA | GP4Wire colour blue |
A 0.96 inch SSD1306 OLED on I2C0 (GP4 and GP5) at address 0x3C, powered from 3V3. MicroPython needs the ssd1306 driver from micropython-lib (mip.install("ssd1306")).
| Part pin | Board pin |
|---|---|
| GND | GNDWire colour black |
| VCC | 3V3Wire colour red |
| SCL | GP5Wire colour yellow |
| SDA | GP4Wire colour blue |
Read the header's silkscreen: some modules are GND VCC SCL SDA, others VCC GND SCL SDA.