Open MtHakkaisun opened 2 years ago
When you say "ModelNotFoundError" what were you doing? What command etc was you running?
Hello
I ran the following script on raspberry pi zero W. ====== demo.py import board import displayio import adafruit_ili9488
spi = board.SPI () tft_cs = board.D8 tft_dc = board.D24
displayio.release_displays () display_bus = displayio.FourWire (spi, command = tft_dc, chip_select = tft_cs)
display = adafruit_ili9488.ILI9488 (display_bus, width = 320, height = 480)
splash = displayio.Group () display.show (splash)
color_bitmap = displayio.Bitmap (320, 480, 1) color_palette = displayio.Palette (1) color_palette [0] = 0xFF0000
bg_sprite = displayio.TileGrid (color_bitmap, pixel_shader = color_palette, x = 0, y = 0) splash.append (bg_sprite)
$ python3 demo.py
Apparently [displaayio] has been installed.
The above is the general flow.
3.5 inch ILI 9488spi display to raspberry pizero W I'm connected, but nothing appears on the display.
note that The result is the same for [import bagaloozy_ili9488].
and///// The following script has been successfully drawn on this raspberry pizero W. ===
shapes_text.py
"""
This demo will draw a few rectangles onto the screen along with some text
on top of that.
This example is for use on (Linux) computers that are using CPython with
Adafruit Blinka to support CircuitPython libraries. CircuitPython does
not support PIL/pillow (python imaging library)!
Author(s): Melissa LeBlanc-Williams for Adafruit Industries
"""
import digitalio
import board
from PIL import Image, ImageDraw, ImageFont
from adafruit_rgb_display import st7735 # pylint: disable=unused-import
BORDER = 20
FONTSIZE = 16
cs_pin = digitalio.DigitalInOut(board.CE0)
dc_pin = digitalio.DigitalInOut(board.D24)
reset_pin = digitalio.DigitalInOut(board.D25)
BAUDRATE = 24000000
spi = board.SPI()
disp = st7735.ST7735R(spi, rotation=90, # 1.8" ST7735R
cs=cs_pin,
dc=dc_pin,
rst=reset_pin,
baudrate=BAUDRATE,
)
if disp.rotation % 180 == 90:
height = disp.width # we swap height/width to rotate it to landscape!
width = disp.height
else:
width = disp.width # we swap height/width to rotate it to landscape!
height = disp.height
image = Image.new("RGB", (width, height))
draw = ImageDraw.Draw(image)
draw.rectangle((0, 0, width, height), fill=(0, 255, 0))
disp.image(image)
draw.rectangle(
(BORDER, BORDER, width - BORDER - 1, height - BORDER - 1), fill=(170,
0, 136)
)
font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", FONTSIZE)
text = "Yatta Ne vvv!"
(font_width, font_height) = font.getsize(text)
draw.text(
(width // 2 - font_width // 2, height // 2 - font_height // 2),
text,
font=font,
fill=(255, 255, 0),
)
disp.image(image)
===========
raspberrypizeroW OS version is
Linux /// 5.10.63+ #1496 Wed Dec 1 15:57:05 GMT 2021 armv6l
$ python3 -V is Python 3.7.3
2022年2月28日(月) 1:55 winneymj @.***>:
When you say "ModelNotFoundError" what were you doing? What command etc was you running?
— Reply to this email directly, view it on GitHub https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053614105, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOASZLRRSVWS2BZQBRGAGJ3U5JJQBANCNFSM5POLY27Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
Hi, I have not run this code on anything other than a ESP32-S2 with 8-bit parallel, not SPI. You will find it in the examples directory. https://github.com/winneymj/CircuitPython_ILI9488/blob/main/examples/ili9488_pitft_simpletest_parallel.py Sorry I cannot help you
On Sun, Feb 27, 2022 at 6:49 PM MtHakkaisun @.***> wrote:
Hello
I ran the following script on raspberry pi zero W. ====== demo.py import board import displayio import adafruit_ili9488
spi = board.SPI () tft_cs = board.D8 tft_dc = board.D24
displayio.release_displays () display_bus = displayio.FourWire (spi, command = tft_dc, chip_select = tft_cs)
display = adafruit_ili9488.ILI9488 (display_bus, width = 320, height = 480)
Make the display context
splash = displayio.Group () display.show (splash)
color_bitmap = displayio.Bitmap (320, 480, 1) color_palette = displayio.Palette (1) color_palette [0] = 0xFF0000
bg_sprite = displayio.TileGrid (color_bitmap, pixel_shader = color_palette, x = 0, y = 0) splash.append (bg_sprite)
while True: pass
$ python3 demo.py
Python3 got an error.
Traceback (most recent call last): File "demo.py", line 2, in
import displayio ModuleNotFoundError: No module named'displayio' I entered this command $ pip3 install adafruit-blinka-displayio
Installing collected packages: adafruit-blinka-displayio Successfully installed adafruit-blinka-displayio-0.9.0
Apparently [displaayio] has been installed.
I typed the following command again. $ python3 demo.py
Traceback (most recent call last): File "demo.py", line 3, in
import adafruit_ili9488 ModuleNotFoundError: No module named'adafruit_ili9488' The above is the general flow.
3.5 inch ILI 9488spi display to raspberry pizero W I'm connected, but nothing appears on the display.
note that The result is the same for [import bagaloozy_ili9488].
and///// The following script has been successfully drawn on this raspberry pizero W. ===
shapes_text.py
SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
SPDX-License-Identifier: MIT
"""
This demo will draw a few rectangles onto the screen along with some text
on top of that.
This example is for use on (Linux) computers that are using CPython with
Adafruit Blinka to support CircuitPython libraries. CircuitPython does
not support PIL/pillow (python imaging library)!
Author(s): Melissa LeBlanc-Williams for Adafruit Industries
"""
import digitalio
import board
from PIL import Image, ImageDraw, ImageFont
from adafruit_rgb_display import st7735 # pylint: disable=unused-import
First define some constants to allow easy resizing of shapes.
BORDER = 20
FONTSIZE = 16
Configuration for CS and DC pins (these are PiTFT defaults):
cs_pin = digitalio.DigitalInOut(board.CE0)
dc_pin = digitalio.DigitalInOut(board.D24)
reset_pin = digitalio.DigitalInOut(board.D25)
Config for display baudrate (default max is 24mhz):
BAUDRATE = 24000000
Setup SPI bus using hardware SPI:
spi = board.SPI()
pylint: disable=line-too-long
Create the display:
disp = st7735.ST7735R(spi, rotation=90, # 1.8" ST7735R
cs=cs_pin,
dc=dc_pin,
rst=reset_pin,
baudrate=BAUDRATE,
)
pylint: enable=line-too-long
Create blank image for drawing.
Make sure to create image with mode 'RGB' for full color.
if disp.rotation % 180 == 90:
height = disp.width # we swap height/width to rotate it to landscape!
width = disp.height
else:
width = disp.width # we swap height/width to rotate it to landscape!
height = disp.height
image = Image.new("RGB", (width, height))
Get drawing object to draw on image.
draw = ImageDraw.Draw(image)
Draw a green filled box as the background
draw.rectangle((0, 0, width, height), fill=(0, 255, 0))
disp.image(image)
Draw a smaller inner purple rectangle
draw.rectangle(
(BORDER, BORDER, width - BORDER - 1, height - BORDER - 1), fill=(170, 0, 136)
)
Load a TTF Font
font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", FONTSIZE)
Draw Some Text
text = "Yatta Ne vvv!"
(font_width, font_height) = font.getsize(text)
draw.text(
(width // 2 - font_width // 2, height // 2 - font_height // 2),
text,
font=font,
fill=(255, 255, 0),
)
Display image.
disp.image(image)
===========
raspberrypizeroW OS version is
Linux /// 5.10.63+ #1496 Wed Dec 1 15:57:05 GMT 2021 armv6l
$ python3 -V is Python 3.7.3
2022年2月28日(月) 1:55 winneymj @.***>:
When you say "ModelNotFoundError" what were you doing? What command etc was you running?
— Reply to this email directly, view it on GitHub < https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053614105 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOASZLRRSVWS2BZQBRGAGJ3U5JJQBANCNFSM5POLY27Q
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053749012, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK26BAQLM5OOYQS3MKDTELU5LBC7ANCNFSM5POLY27Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
The script on your page is not a script for raspberry pi, isn't it? https://github.com/winneymj/CircuitPython_ILI9488/blob/main/examples/ili9488_pitft_simpletest_parallel.py
2022年2月28日(月) 11:32 winneymj @.***>:
Hi, I have not run this code on anything other than a ESP32-S2 with 8-bit parallel, not SPI. You will find it in the examples directory.
https://github.com/winneymj/CircuitPython_ILI9488/blob/main/examples/ili9488_pitft_simpletest_parallel.py Sorry I cannot help you
On Sun, Feb 27, 2022 at 6:49 PM MtHakkaisun @.***> wrote:
Hello
I ran the following script on raspberry pi zero W. ====== demo.py import board import displayio import adafruit_ili9488
spi = board.SPI () tft_cs = board.D8 tft_dc = board.D24
displayio.release_displays () display_bus = displayio.FourWire (spi, command = tft_dc, chip_select = tft_cs)
display = adafruit_ili9488.ILI9488 (display_bus, width = 320, height = 480)
Make the display context
splash = displayio.Group () display.show (splash)
color_bitmap = displayio.Bitmap (320, 480, 1) color_palette = displayio.Palette (1) color_palette [0] = 0xFF0000
bg_sprite = displayio.TileGrid (color_bitmap, pixel_shader = color_palette, x = 0, y = 0) splash.append (bg_sprite)
while True: pass
$ python3 demo.py
Python3 got an error.
Traceback (most recent call last): File "demo.py", line 2, in
import displayio ModuleNotFoundError: No module named'displayio' I entered this command $ pip3 install adafruit-blinka-displayio
Installing collected packages: adafruit-blinka-displayio Successfully installed adafruit-blinka-displayio-0.9.0
Apparently [displaayio] has been installed.
I typed the following command again. $ python3 demo.py
Traceback (most recent call last): File "demo.py", line 3, in
import adafruit_ili9488 ModuleNotFoundError: No module named'adafruit_ili9488' The above is the general flow.
3.5 inch ILI 9488spi display to raspberry pizero W I'm connected, but nothing appears on the display.
note that The result is the same for [import bagaloozy_ili9488].
and///// The following script has been successfully drawn on this raspberry pizero W. ===
shapes_text.py
SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
SPDX-License-Identifier: MIT
"""
This demo will draw a few rectangles onto the screen along with some text
on top of that.
This example is for use on (Linux) computers that are using CPython with
Adafruit Blinka to support CircuitPython libraries. CircuitPython does
not support PIL/pillow (python imaging library)!
Author(s): Melissa LeBlanc-Williams for Adafruit Industries
"""
import digitalio
import board
from PIL import Image, ImageDraw, ImageFont
from adafruit_rgb_display import st7735 # pylint: disable=unused-import
First define some constants to allow easy resizing of shapes.
BORDER = 20
FONTSIZE = 16
Configuration for CS and DC pins (these are PiTFT defaults):
cs_pin = digitalio.DigitalInOut(board.CE0)
dc_pin = digitalio.DigitalInOut(board.D24)
reset_pin = digitalio.DigitalInOut(board.D25)
Config for display baudrate (default max is 24mhz):
BAUDRATE = 24000000
Setup SPI bus using hardware SPI:
spi = board.SPI()
pylint: disable=line-too-long
Create the display:
disp = st7735.ST7735R(spi, rotation=90, # 1.8" ST7735R
cs=cs_pin,
dc=dc_pin,
rst=reset_pin,
baudrate=BAUDRATE,
)
pylint: enable=line-too-long
Create blank image for drawing.
Make sure to create image with mode 'RGB' for full color.
if disp.rotation % 180 == 90:
height = disp.width # we swap height/width to rotate it to landscape!
width = disp.height
else:
width = disp.width # we swap height/width to rotate it to landscape!
height = disp.height
image = Image.new("RGB", (width, height))
Get drawing object to draw on image.
draw = ImageDraw.Draw(image)
Draw a green filled box as the background
draw.rectangle((0, 0, width, height), fill=(0, 255, 0))
disp.image(image)
Draw a smaller inner purple rectangle
draw.rectangle(
(BORDER, BORDER, width - BORDER - 1, height - BORDER - 1), fill=(170, 0, 136)
)
Load a TTF Font
font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", FONTSIZE)
Draw Some Text
text = "Yatta Ne vvv!"
(font_width, font_height) = font.getsize(text)
draw.text(
(width // 2 - font_width // 2, height // 2 - font_height // 2),
text,
font=font,
fill=(255, 255, 0),
)
Display image.
disp.image(image)
===========
raspberrypizeroW OS version is
Linux /// 5.10.63+ #1496 Wed Dec 1 15:57:05 GMT 2021 armv6l
$ python3 -V is Python 3.7.3
2022年2月28日(月) 1:55 winneymj @.***>:
When you say "ModelNotFoundError" what were you doing? What command etc was you running?
— Reply to this email directly, view it on GitHub <
https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053614105
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AOASZLRRSVWS2BZQBRGAGJ3U5JJQBANCNFSM5POLY27Q
. Triage notifications on the go with GitHub Mobile for iOS <
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android <
.
You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub < https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053749012 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABK26BAQLM5OOYQS3MKDTELU5LBC7ANCNFSM5POLY27Q
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053812042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOASZLTGC4ZVI7G63BPQY5DU5LNC5ANCNFSM5POLY27Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
I have not tested with the raspberry pi for sure. I might not work. Only tested with ESP32-S2.
On Sun, Feb 27, 2022 at 8:59 PM MtHakkaisun @.***> wrote:
The script on your page is not a script for raspberry pi, isn't it?
2022年2月28日(月) 11:32 winneymj @.***>:
Hi, I have not run this code on anything other than a ESP32-S2 with 8-bit parallel, not SPI. You will find it in the examples directory.
https://github.com/winneymj/CircuitPython_ILI9488/blob/main/examples/ili9488_pitft_simpletest_parallel.py Sorry I cannot help you
On Sun, Feb 27, 2022 at 6:49 PM MtHakkaisun @.***> wrote:
Hello
I ran the following script on raspberry pi zero W. ====== demo.py import board import displayio import adafruit_ili9488
spi = board.SPI () tft_cs = board.D8 tft_dc = board.D24
displayio.release_displays () display_bus = displayio.FourWire (spi, command = tft_dc, chip_select = tft_cs)
display = adafruit_ili9488.ILI9488 (display_bus, width = 320, height = 480)
Make the display context
splash = displayio.Group () display.show (splash)
color_bitmap = displayio.Bitmap (320, 480, 1) color_palette = displayio.Palette (1) color_palette [0] = 0xFF0000
bg_sprite = displayio.TileGrid (color_bitmap, pixel_shader = color_palette, x = 0, y = 0) splash.append (bg_sprite)
while True: pass
$ python3 demo.py
Python3 got an error.
Traceback (most recent call last): File "demo.py", line 2, in
import displayio ModuleNotFoundError: No module named'displayio' I entered this command $ pip3 install adafruit-blinka-displayio
Installing collected packages: adafruit-blinka-displayio Successfully installed adafruit-blinka-displayio-0.9.0
Apparently [displaayio] has been installed.
I typed the following command again. $ python3 demo.py
Traceback (most recent call last): File "demo.py", line 3, in
import adafruit_ili9488 ModuleNotFoundError: No module named'adafruit_ili9488' The above is the general flow.
3.5 inch ILI 9488spi display to raspberry pizero W I'm connected, but nothing appears on the display.
note that The result is the same for [import bagaloozy_ili9488].
and///// The following script has been successfully drawn on this raspberry pizero W. ===
shapes_text.py
SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
SPDX-License-Identifier: MIT
"""
This demo will draw a few rectangles onto the screen along with some text
on top of that.
This example is for use on (Linux) computers that are using CPython with
Adafruit Blinka to support CircuitPython libraries. CircuitPython does
not support PIL/pillow (python imaging library)!
Author(s): Melissa LeBlanc-Williams for Adafruit Industries
"""
import digitalio
import board
from PIL import Image, ImageDraw, ImageFont
from adafruit_rgb_display import st7735 # pylint: disable=unused-import
First define some constants to allow easy resizing of shapes.
BORDER = 20
FONTSIZE = 16
Configuration for CS and DC pins (these are PiTFT defaults):
cs_pin = digitalio.DigitalInOut(board.CE0)
dc_pin = digitalio.DigitalInOut(board.D24)
reset_pin = digitalio.DigitalInOut(board.D25)
Config for display baudrate (default max is 24mhz):
BAUDRATE = 24000000
Setup SPI bus using hardware SPI:
spi = board.SPI()
pylint: disable=line-too-long
Create the display:
disp = st7735.ST7735R(spi, rotation=90, # 1.8" ST7735R
cs=cs_pin,
dc=dc_pin,
rst=reset_pin,
baudrate=BAUDRATE,
)
pylint: enable=line-too-long
Create blank image for drawing.
Make sure to create image with mode 'RGB' for full color.
if disp.rotation % 180 == 90:
height = disp.width # we swap height/width to rotate it to landscape!
width = disp.height
else:
width = disp.width # we swap height/width to rotate it to landscape!
height = disp.height
image = Image.new("RGB", (width, height))
Get drawing object to draw on image.
draw = ImageDraw.Draw(image)
Draw a green filled box as the background
draw.rectangle((0, 0, width, height), fill=(0, 255, 0))
disp.image(image)
Draw a smaller inner purple rectangle
draw.rectangle(
(BORDER, BORDER, width - BORDER - 1, height - BORDER - 1), fill=(170, 0, 136)
)
Load a TTF Font
font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", FONTSIZE)
Draw Some Text
text = "Yatta Ne vvv!"
(font_width, font_height) = font.getsize(text)
draw.text(
(width // 2 - font_width // 2, height // 2 - font_height // 2),
text,
font=font,
fill=(255, 255, 0),
)
Display image.
disp.image(image)
===========
raspberrypizeroW OS version is
Linux /// 5.10.63+ #1496 Wed Dec 1 15:57:05 GMT 2021 armv6l
$ python3 -V is Python 3.7.3
2022年2月28日(月) 1:55 winneymj @.***>:
When you say "ModelNotFoundError" what were you doing? What command etc was you running?
— Reply to this email directly, view it on GitHub <
https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053614105
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AOASZLRRSVWS2BZQBRGAGJ3U5JJQBANCNFSM5POLY27Q
. Triage notifications on the go with GitHub Mobile for iOS <
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android <
.
You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub <
https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053749012
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ABK26BAQLM5OOYQS3MKDTELU5LBC7ANCNFSM5POLY27Q
. Triage notifications on the go with GitHub Mobile for iOS <
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android <
.
You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub < https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053812042 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOASZLTGC4ZVI7G63BPQY5DU5LNC5ANCNFSM5POLY27Q
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/winneymj/CircuitPython_ILI9488/issues/1#issuecomment-1053826360, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK26BASNMQ7TADUN7Q2A7LU5LQILANCNFSM5POLY27Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
I also had trouble with this documentation, for reference. To include this library (so when you've got the same error message). Run this command:
pip3 install git+https://github.com/winneymj/CircuitPython_ILI9488
Where is this module?