PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
346 stars 88 forks source link

Update buttons example script for PaPiRus Zero #54

Closed digithree closed 7 years ago

digithree commented 8 years ago

Add command line options to switch button pins to PaPiRus Zero mapping. Use -z or --zero to activate. Defaults to standard mapping

francesco-vannini commented 7 years ago

Hi @digithree , thanks for this. could this not be automatically done by checking if it is a HAT or not in the case of the Zero? Maybe by looking at I2C. If that's not the case could you also provide a "usage" description for the main README.md?

shawaj commented 7 years ago

Could definitely be done by checking for the HAT EEPROM.

Or alternatively looking for the RTC

On 30 Jan 2017 11:12 am, "Garage Tech" notifications@github.com wrote:

Hi @digithree https://github.com/digithree , thanks for this. could this not be automatically done by checking if it is a HAT or not in the case of the Zero? Maybe by looking at I2C. If that's not the case could you also provide a "usage" description for the main README.md?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/pull/54#issuecomment-276036403, or mute the thread https://github.com/notifications/unsubscribe-auth/ADNCug_KO7S3h65d2MENy0syVI1wwnKoks5rXcWngaJpZM4JjqTB .

digithree commented 7 years ago

Hmm, I'm not sure how to do that. Could you point me in the right direction?

shawaj commented 7 years ago

If it's a HAT you should have a value of Pi Supply in /proc/device-tree/hat/vendor and PaPiRus ePaper HAT v1.8 or v1.9 in /proc/device-tree/hat/product

You can find them by putting "cat" in front of the address.

And also if it's a HAT you should have something connected to address 0x6F on the I2C bus. That's the RTC.

Thanks

On 4 Feb 2017 4:25 pm, "Simon Kenny" notifications@github.com wrote:

Hmm, I'm not sure how to do that. Could you point me in the right direction?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/pull/54#issuecomment-277457051, or mute the thread https://github.com/notifications/unsubscribe-auth/ADNCuk06qeVdzLz8cU8rI-Y0J-6Nbe3kks5rZKZbgaJpZM4JjqTB .

tvoverbeek commented 7 years ago

See my PR #79 which implements Aarons (shawaj) suggestion for HAT detection.

francesco-vannini commented 7 years ago

This has been sorted already in #77 and #79 so closing this PR

digithree commented 7 years ago

That's fine, glad it is apparently sorted. I'll check it out soon.

shawaj commented 7 years ago

Thanks for your code though