Skip to content

Support pHAT with SSD1608#38

Merged
lawik merged 2 commits into
pappersverk:masterfrom
mnishiguchi:mnishiguchi/ssd1608
Nov 7, 2021
Merged

Support pHAT with SSD1608#38
lawik merged 2 commits into
pappersverk:masterfrom
mnishiguchi:mnishiguchi/ssd1608

Conversation

@mnishiguchi

@mnishiguchi mnishiguchi commented Nov 7, 2021

Copy link
Copy Markdown
Contributor

According to Pimoroni's catalog:

We started rolling out a higher resolution SSD1608 e-paper screen on Inky pHAT from late 2020 (250x122 pixels instead of 212x104!). These new screens require different drivers ...

As I looked into the Pimoroni's Python library, they are pretty different despite physically looking identical. The device variants can be found here in the source code.

So I ended up writing a dedicated HAL module for pHAT with SSD1608.

## Usage

# when type is `:phat_ssd1608`, `Inky.HAL.PhatSSD1608` module is used by default
Inky.start_link(:phat_ssd1608, :red, %{name: InkySample})

Notes

  • I realized that the Display struct is not so useful for this particular model since only accent is changeable; others are static. So I decided to specify the display info as module attributes in Inky.HAL.PhatSSD1608 module.
  • I tested with pHat SSD1608 Black and pHat SSD1608 Red running the "brief example" program in README.

@lawik lawik merged commit 1f2e69e into pappersverk:master Nov 7, 2021
@nyaray

nyaray commented Nov 9, 2021

Copy link
Copy Markdown
Collaborator

I like this overall, though I think that there could have been some deduplication in the nearly identical HAL files. Something for a later clean-up PR, I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants