fubiii11
fubiii11

Reputation: 11

Raspberry pi pico lcd screen wont work using the official raspberry pi tutorial book (LCD-1602)

I followed the official Raspberry Pi Pico book and copied the code. I checked all the wires and they are connected correctly. If I runt he code there is no text being displayed the screen just goes on really fast and then off again.

here is the code from the book (page 118)

import machine

sda = machine.Pin(0)
scl = machine.Pin(1)

i2c = machine.I2C(0, sda=sda, scl=scl, freq=400000)

print(i2c.scan())
i2c.writeto(0x27, b'\x7C')
i2c.writeto(0x27, b'\x2D')
i2c.writeto(0x27, "hello world")

I connected the sda to the GPIO pin 0 and the scl to the GPIO pin 1 I also connected the ground to the GND pin (38) and the VCC to the VBUS. I also tried connecting it to the 3V3(Out) but that doesn't change anything.

what i also tried is to use encode() after my string but that didn't help

is there a mistake in the book or am i doing something wrong?

I plugged the cables to different sda and scl ports. I tried 3V3 and 5V. i tried to encode the string and also added b'' I also tried to change the frequency

Upvotes: 0

Views: 35

Answers (0)

Related Questions