View: 1396|Reply: 1

Project 1602 LCD Starter Kit for Raspberry Pi doesn't work with Pico W

[Copy link]

1

Threads

1

Posts

7

Credits

Newbie

Rank: 1

Credits
7
Post time 2023-6-29 11:05:55 | Show all posts |Read mode
Hi.  I purchased the Adeept Starter Kit for Raspberry Pi which has a 1602 display module.  I download the zip file for the tutorial/code/wiring diagram.

The zip package seems to be aimed for using the Raspberry Pi 3,4, etc.   I have a Pico W which has different pin configuration.  I connected the 1602 to the Pico W as follows:

1602 (D4 - pin 6) <-> Pico GP17 (pin 22)
1602 (D5 - pin 5) <-> Pico GP18 (pin 24)
1602 (D6 - pin 4) <-> Pico GP27 (pin 32)
1602 (D7 - pin 3) <-> Pico GP22 (pin 29)
1602 (E - pin 11) <-> Pico GP15 (pin 20)
1602 (RS - pin 13) <-> Pico GP14 (pin 19)

Using Thonny, I used the code in the zip file and received the following error message:
Traceback (most recent call last):
  File "<stdin>", line 268, in <module>
  File "<stdin>", line 255, in loop
  File "<stdin>", line 61, in __init__
ImportError: no module named 'RPi'

Is the reason for this because I'm using MicroPython and not the full blown Python?  If so, where/how can I load the library?
Also, the code in the Python program seems to match my pin assignments:

   def __init__(self, pin_rs=14, pin_e=15, pins_db=[17, 18, 27, 22], GPIO = None):


Any help would be appreciated!

Thank yoU!


Reply

Use magic Report

0

Threads

51

Posts

189

Credits

Administrator

Rank: 9Rank: 9Rank: 9

Credits
189
Post time 2023-7-4 09:57:14 | Show all posts
The Raspberry Pi is different from the Pico. Pico has no built-in related library files.
The following three documents may be helpful to you.

i2c_lcd.py

3.16 KB, Downloads: 63

lcd_api.py

6.78 KB, Downloads: 72

24_i2c_lcd1602.py

1.22 KB, Downloads: 79

Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules