Skip to content

Commit

Permalink
Merge pull request #85 from makermelissa/master
Browse files Browse the repository at this point in the history
Added text specifying Pillow Examples don't run in CircuitPython
  • Loading branch information
makermelissa authored Jul 27, 2020
2 parents 246f724 + ed34d54 commit 24fd6c1
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.

For improved performance consider installing numpy.
For the Pillow Examples, you will need to be running CPython. This means using a Single Board Computer
such as a Raspberry Pi or using a chip such as an FT232H on Linux, Window, or Mac. CircuitPython does
not support PIL/pillow (python imaging library)!

For improved performance consider installing NumPy.

Installing from PyPI
====================
Expand Down Expand Up @@ -149,7 +153,7 @@ With 1.14" `wiring <https://learn.adafruit.com/adafruit-1-14-240x135-color-tft-b
display.fill(color565(0, 0, 255))
# Pause 2 seconds.
time.sleep(2)
Contributing
============
Expand Down
2 changes: 2 additions & 0 deletions adafruit_rgb_display/ssd1331.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,7 @@ def write(self, command=None, data=None):
with self.spi_device as spi:
if command is not None:
spi.write(bytearray([command]))
print(bytearray([command]))
if data is not None:
spi.write(data)
print(data)
5 changes: 5 additions & 0 deletions examples/rgb_display_pillow_bonnet_buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
# 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)!
"""
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)!
"""

import time
import random
Expand Down
11 changes: 11 additions & 0 deletions examples/rgb_display_pillow_demo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
"""
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
Expand Down
10 changes: 10 additions & 0 deletions examples/rgb_display_pillow_image.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
Be sure to check the learn guides for more usage information.
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
Expand Down
10 changes: 10 additions & 0 deletions examples/rgb_display_pillow_stats.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
This will show some Linux Statistics on the attached display. Be sure to adjust
to the display you have connected. Be sure to check the learn guides for more
usage information.
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)!
"""

import time
import subprocess
import digitalio
Expand Down

0 comments on commit 24fd6c1

Please sign in to comment.