wiring

Let’s start with a picture of NodeMCU



On the last wiring diagram



Explain the oled pins

VCC: Power supply, connect3v3Pins. They’re printed on some OLedsVDD, andVCCThe sameGND: Grounding, connectionGNDpin

SCLClock, find the boardCLKPins, you can connect other pins if you don’t want to show the time, hereD5

SDA: Data transfer, pick up any oneGPIOHere receivedD3on

Remember which one I’m connecting to hereGPIO.SCLisGPIO0.SDAisGPIO14.

Hello World

Open the serial debugging assistant and open the serial port.



Send the following commands in sequence

from machine import Pin, I2C from ssd1306 import SSD1306_I2C i2c = I2C(scl=Pin(14), Sda =Pin(0) # GPIO OLED = SSD1306_I2C(128, 64, i2c) OLED. Text ("Hello World",0,0) OLED. Show ()Copy the code

The effect of