Skip to content
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

Use Waveshare Repo as the eink display driver #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ePaperPython/driver"]
path = ePaperPython/driver
url = https://github.com/waveshare/e-Paper
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ git clone https://github.com/BenRoe/rpi-magicmirror-eink.git
cd rpi-magicmirror-eink
```

- Obtain Waveshare driver
```shell
git submodule update --init --recursive
```

- Install Node.js dependencies (inside the `rpi-magicmirror-eink` folder)
```shell
npm install
Expand Down
1 change: 1 addition & 0 deletions ePaperPython/driver
Submodule driver added at 8af38f
207 changes: 0 additions & 207 deletions ePaperPython/epd7in5.py

This file was deleted.

63 changes: 0 additions & 63 deletions ePaperPython/epdif.py

This file was deleted.

9 changes: 2 additions & 7 deletions ePaperPython/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@
# THE SOFTWARE.
##

import epd7in5
from driver.RaspberryPi_JetsonNano.python.lib.waveshare_epd import epd7in5
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
#import imagedata

EPD_WIDTH = 640
EPD_HEIGHT = 384

def main():
epd = epd7in5.EPD()
epd.init()
Expand All @@ -50,7 +45,7 @@ def main():
# epd.display_frame(epd.get_frame_buffer(image))

image = Image.open('screenshot.png')
epd.display_frame(epd.get_frame_buffer(image))
epd.display(epd.getbuffer(image))

# You can get frame buffer from an image or import the buffer directly:
#epd.display_frame(imagedata.MONOCOLOR_BITMAP)
Expand Down