-
Notifications
You must be signed in to change notification settings - Fork 10
Add examples and lint #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"""Simple test script for 1.54" 152x152 tri-color display. | ||
|
||
Supported products: | ||
* Adafruit 1.54" Tri-Color Display Breakout | ||
* https://www.adafruit.com/product/3625 | ||
""" | ||
|
||
import time | ||
import board | ||
import busio | ||
import displayio | ||
import adafruit_il0373 | ||
|
||
displayio.release_displays() | ||
|
||
# This pinout works on a Metro and may need to be altered for other boards. | ||
|
||
# For breadboarding | ||
spi = busio.SPI(board.SCL, board.SDA) | ||
epd_cs = board.D9 | ||
epd_dc = board.D8 | ||
epd_reset = board.D7 | ||
epd_busy = board.D6 | ||
|
||
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, | ||
baudrate=1000000) | ||
time.sleep(1) | ||
|
||
display = adafruit_il0373.IL0373(display_bus, width=152, height=152, busy_pin=epd_busy, | ||
highlight_color=0xff0000) | ||
|
||
g = displayio.Group() | ||
|
||
f = open("/display-ruler.bmp", "rb") | ||
|
||
pic = displayio.OnDiskBitmap(f) | ||
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter()) | ||
g.append(t) | ||
|
||
display.show(g) | ||
|
||
display.refresh() | ||
|
||
print("refreshed") | ||
|
||
time.sleep(120) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"""Simple test script for 2.13" 212x104 tri-color display. | ||
|
||
Supported products: | ||
* Adafruit 2.13" Tri-Color Display Breakout | ||
* https://www.adafruit.com/product/4086 | ||
""" | ||
|
||
import time | ||
import board | ||
import busio | ||
import displayio | ||
import adafruit_il0373 | ||
|
||
displayio.release_displays() | ||
|
||
# This pinout works on a Metro and may need to be altered for other boards. | ||
|
||
# For breadboarding | ||
spi = busio.SPI(board.SCL, board.SDA) | ||
tannewt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
epd_cs = board.D9 | ||
epd_dc = board.D8 | ||
epd_reset = board.D7 | ||
epd_busy = board.D6 | ||
|
||
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, | ||
baudrate=1000000) | ||
time.sleep(1) | ||
|
||
display = adafruit_il0373.IL0373(display_bus, width=212, height=104, rotation=90, busy_pin=epd_busy, | ||
highlight_color=0xff0000) | ||
|
||
g = displayio.Group() | ||
|
||
f = open("/display-ruler.bmp", "rb") | ||
|
||
pic = displayio.OnDiskBitmap(f) | ||
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter()) | ||
g.append(t) | ||
|
||
display.show(g) | ||
|
||
display.refresh() | ||
|
||
print("refreshed") | ||
|
||
time.sleep(120) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""Simple test script for 2.13" 212x104 black and white display. | ||
|
||
Supported products: | ||
* Adafruit Flexible 2.13" Black and White | ||
* https://www.adafruit.com/product/4243 | ||
""" | ||
|
||
import time | ||
import board | ||
import busio | ||
import displayio | ||
import adafruit_il0373 | ||
|
||
displayio.release_displays() | ||
|
||
# This pinout works on a Metro and may need to be altered for other boards. | ||
|
||
# For breadboarding | ||
spi = busio.SPI(board.SCL, board.SDA) | ||
tannewt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
epd_cs = board.D9 | ||
epd_dc = board.D8 | ||
epd_reset = board.D7 | ||
epd_busy = board.D6 | ||
|
||
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, | ||
baudrate=1000000) | ||
time.sleep(1) | ||
|
||
display = adafruit_il0373.IL0373(display_bus, width=212, height=104, rotation=90, busy_pin=epd_busy, | ||
swap_rams=True) | ||
|
||
g = displayio.Group() | ||
|
||
f = open("/display-ruler.bmp", "rb") | ||
|
||
pic = displayio.OnDiskBitmap(f) | ||
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter()) | ||
g.append(t) | ||
|
||
display.show(g) | ||
|
||
display.refresh() | ||
|
||
time.sleep(120) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""Simple test script for 2.9" 296x128 black and white display. | ||
|
||
Supported products: | ||
* Adafruit Flexible 2.9" Black and White | ||
* https://www.adafruit.com/product/4262 | ||
""" | ||
|
||
import time | ||
import board | ||
import busio | ||
import displayio | ||
import adafruit_il0373 | ||
|
||
displayio.release_displays() | ||
|
||
# This pinout works on a Metro and may need to be altered for other boards. | ||
|
||
# For breadboarding | ||
spi = busio.SPI(board.SCL, board.SDA) | ||
tannewt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
epd_cs = board.D9 | ||
epd_dc = board.D8 | ||
epd_reset = board.D7 | ||
epd_busy = board.D6 | ||
|
||
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, | ||
baudrate=1000000) | ||
time.sleep(1) | ||
|
||
display = adafruit_il0373.IL0373(display_bus, width=296, height=128, rotation=90, busy_pin=epd_busy, | ||
swap_rams=True) | ||
|
||
g = displayio.Group() | ||
|
||
f = open("/display-ruler.bmp", "rb") | ||
|
||
pic = displayio.OnDiskBitmap(f) | ||
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter()) | ||
g.append(t) | ||
|
||
display.show(g) | ||
|
||
display.refresh() | ||
|
||
time.sleep(120) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"""Simple test script for 2.13" 212x104 tri-color featherwing. | ||
|
||
Supported products: | ||
* Adafruit 2.13" Tri-Color FeatherWing | ||
* https://www.adafruit.com/product/4128 | ||
""" | ||
|
||
import time | ||
import board | ||
import displayio | ||
import adafruit_il0373 | ||
|
||
displayio.release_displays() | ||
|
||
epd_cs = board.D9 | ||
epd_dc = board.D10 | ||
|
||
display_bus = displayio.FourWire(board.SPI(), command=epd_dc, chip_select=epd_cs, baudrate=1000000) | ||
time.sleep(1) | ||
|
||
display = adafruit_il0373.IL0373(display_bus, width=212, height=104, rotation=90, | ||
highlight_color=0xff0000) | ||
|
||
g = displayio.Group() | ||
|
||
f = open("/display-ruler.bmp", "rb") | ||
|
||
pic = displayio.OnDiskBitmap(f) | ||
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter()) | ||
g.append(t) | ||
|
||
display.show(g) | ||
|
||
display.refresh() | ||
|
||
print("refreshed") | ||
|
||
time.sleep(120) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.