Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

E-ink Featherwing
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

E-ink Featherwing

by Fruit_Loop on Mon Apr 27, 2020 10:37 am

Good afternoon.
I'm afraid I have beginner problems, I feel the solution is easy but it's stumping me.
I have a feather basic and https://www.adafruit.com/product/4195 Adafruit 2.13" Monochrome eInk / ePaper Display FeatherWing - 250x122 Monochrome.

I managed to get this to work okay through arduino and then moved onto circuitpython.
I ensured it's using the latest version on the board.

This is the code from the example I'm trying to run.
Code: Select all | TOGGLE FULL SIZE
import time
import board
import displayio
import adafruit_ssd1675


# Set based on your display
FLEXIBLE = False
TRICOLOR = False
ROTATION = 90

# Used to ensure the display is free in CircuitPython
displayio.release_displays()

# Define the pins needed for display use
# This pinout is for a Feather M4 and may be different for other boards
# For the Metro/Shield, esc is board.D10 and dc is board.D9
spi = board.SPI()  # Uses SCK and MOSI
ecs = board.D9
dc = board.D10
rst = None    # set to None for FeatherWing/Shield
busy = None   # set to None for FeatherWing/Shield

if TRICOLOR:
    highlight = 0xff0000
    # third color is red (0xff0000)
else:
    highlight = 0x000000
 
# Create the displayio connection to the display pins
display_bus = displayio.FourWire(spi, command=dc, chip_select=ecs,
                                 reset=rst, baudrate=1000000)
 
time.sleep(1)  # Wait a bit
 
# Create the display object

display = adafruit_ssd1675.SSD1675(display_bus, width=122, height=250,   
                                   busy_pin=busy, rotation=ROTATION,
                                   highlight_color=highlight)
 
# Create a display group for our screen objects
g = displayio.Group()
 
# Display a ruler graphic from the root directory of the CIRCUITPY drive
f = open("/display-ruler.bmp", "rb")
 
pic = displayio.OnDiskBitmap(f)
# Create a Tilegrid with the bitmap and put in the displayio group
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
 
# Place the display group on the screen
display.show(g)
 
# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
display.refresh()
print("refreshed")
 
time.sleep(180)


I have placed the all the files into the drive as indicated. Code.py + display-ruler.bmp into main root and adafruit_ssd1675.mpy into the lib directory.
The image (display-ruler.bmp) is not the image in the demo, as this was too large to go on the flash, so I created a simple dot image.

Could anyone point me into the right direction? Would be nice to run circuitpython.

Fruit_Loop
 
Posts: 5
Joined: Thu Apr 23, 2020 12:00 pm

Re: E-ink Featherwing

by tannewt on Mon Apr 27, 2020 1:52 pm

What error is happening or what isn't working that you'd expect to happen?

tannewt
 
Posts: 1669
Joined: Thu Oct 06, 2016 8:48 pm

Re: E-ink Featherwing

by Fruit_Loop on Mon Apr 27, 2020 2:51 pm

Yes, that might help.
The error ImportError: no module named 'displayio' comes up in REPL console

I found this post https://github.com/adafruit/circuitpython/issues/1825 but Im not sure if the two are related or how I chnage the code.

This is my Bootout file
Adafruit CircuitPython 5.2.0 on 2020-04-09; Adafruit Feather M0 Basic with samd21g18

And these are the modules I have
>>> help("modules")
__main__ digitalio pulseio sys
analogio gc random time
array math rotaryio touchio
board microcontroller rtc usb_hid
builtins micropython storage usb_midi
busio neopixel_write struct
collections os supervisor
Plus any modules on the filesystem

Fruit_Loop
 
Posts: 5
Joined: Thu Apr 23, 2020 12:00 pm

Re: E-ink Featherwing

by tannewt on Mon Apr 27, 2020 4:26 pm

Ah! Unfortunately we don't include displayio in the Feather M0 Basic build because we don't have the flash space. Do you have any other Feathers?

tannewt
 
Posts: 1669
Joined: Thu Oct 06, 2016 8:48 pm

Re: E-ink Featherwing

by Fruit_Loop on Mon Apr 27, 2020 4:54 pm

Right.... Is that documented somewhere and I missed it on the sales page? I just purchased this gear as a start up project.

Is there a work around to this as I don't have any other feathers. Not being able to use circuitpython is not necessarily a deal breaker.
All I'm trying to do is write some text information to the E-ink display. I don't mind using arduino and have managed to get the demo working on it, the only thing I need to do with my code is store a variable into the flash that remains there through power cycles. Could you guide me on that? I'm also trying to work why the serial monitor does not work with this. I can program the board( so not a charging cable) I can see two com ports (one user and one bootloader space) But I cant get serial output.

Fruit_Loop
 
Posts: 5
Joined: Thu Apr 23, 2020 12:00 pm

Re: E-ink Featherwing

by tannewt on Mon Apr 27, 2020 6:29 pm

We have a support matrix here: https://circuitpython.readthedocs.io/en ... atrix.html (I added info about this here too: https://learn.adafruit.com/adafruit-ein ... hon-code-2 )

In general, we no longer recommend M0 boards because we cannot always fit new code in them. (As is the case here.) SAMD51 (aka M4) and nRF52840 boards are recommended because they feature more flash and ram. (They also tend to be faster.)

tannewt
 
Posts: 1669
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.