-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactor and add support for Inky Impression 7.3" #49
base: master
Are you sure you want to change the base?
Refactor and add support for Inky Impression 7.3" #49
Conversation
Fixes a off by one error
Just put a comment instead of an actual call in case we want to restore the calls later.
Jax/inky impression
There's no code changes, only the version number has been updated: https://github.com/elixir-circuits/circuits_gpio/blob/cc7d77479a4d2ffba1a24962ad067f4680003de4/CHANGELOG.md#v100---10-20-2021
Support circuits_gpio 1.0
Add support for buttons on Inky Impression
There's no breaking changes except for a small one in circuits spi 1.4.0 that says "Remove Erlang convenience functions since no one used them"
I did some searching and found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookin great! Here's a first pass with plenty of small suggestions and some questions. I don't think anything here is a blocker really, but I'd be happy to see some of these changes.
} | ||
end | ||
|
||
# WARNING: This is untested on actual hardware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I wonder if Pimoroni would be willing to send us one? I went ahead and wrote a quick note to their support team to see if there's a chance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pimoroni is sending me a 4" Impression for testing 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, that's great!!
end | ||
|
||
# | ||
# pipe-able wrappers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are re-used, does it make sense to put them into a common helper module?
|
||
spi_address = "spidev0." <> to_string(pin_mappings[:spi]) | ||
|
||
IO.puts("opening DC pin") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other places, we're using Logger
. Probably best to be consistent and use Logger
here too.
spi_write(state, @spi_command, value) | ||
end | ||
|
||
require Logger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookin great! Here's a first pass with plenty of small suggestions and some questions. I don't think anything here is a blocker really, but I'd be happy to see some of these changes.
So glad to see this continues to get usage/updates, nothing constructive to add, really. ✌️ |
Well spotted! Updated in 975d63b |
Also improve the moduledocs
Just wondering if this PR has fizzled? I’d be able to help from next week if there’s anything I can do. I have some spares I can test on (will have to check which models). |
I don't know if my Impression is broken or if the code is :D @cloud8421 I believe this ran for @axelson at some point. Try and see if you can get it running if you can. I'd love for us to wrap this up but was not involved very much in the later developments :) |
Bit of a hiccup - I just tried to boot my impression 7" with the original firmware and I think there's some hardware issues as it's not working as it was before. Have to dig more but I'm unable to test for now. Will keep you posted. |
No luck in reviving the old hardware - I've ordered a new one, it normally takes very little so I HOPE I can test this early in the week. |
I would love if this finally goes over the finish line. I should shove RPi OS on one of my units and just test my hardware. |
Got the Impression 7.3 device and did initial testing. As a testbed, I've generated a plain application with I've then run the following code in the device SSH console:
It throws the following error, and causes a device reboot:
The error maps to:
I haven't touched any configuration, so following the code it should resolve to the default 22 pin, which according to the device schematics seems correct. The impression device is new, but I don't think they've changed chipset: looking at Pimoroni Python's source, they map this model to the chipset implemented in this branch, and the PIN number seems correct. |
The Inky Impression 7.3" uses a different chip than the Impression 5.7" and 4" so it required a new HAL module.
To fit this new chip support into the library I also undertook a refactor
I have tested this on (using https://github.com/axelson/inky_tester):
This merges the contents of the
impression
branch which also includes code/work from @lawik and @jasonmj ❤️