-
Notifications
You must be signed in to change notification settings - Fork 84
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
Papirus hat MCP7940N examples #55
Papirus hat MCP7940N examples #55
Conversation
The amount of changes on this PR is considerable, could we maybe review and break down a bit. It looks like a great piece of work, just need to make it simpler for me to integrate. Is it something you would consider? Sorry this has been pending for such a long time |
Resynced with PiSupply/master. Will try to split it up in smaller pieces and squashing commits so it is easier to merge. |
Removing the root check.... This could break functionality for people using
old OS no? So could be good to keep it, or do a check and keep it where
necessary?
Just a thought. Not sure of the best option
…On 22 Jan 2017 8:47 pm, "tvoverbeek" ***@***.***> wrote:
Resynced with PiSupply/master. Will try to split it up in smaller pieces
and squashing commits so it is easier to merge.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADNCumICcSsH-4MfIy2Kl8gtBFta-KhUks5rU8BhgaJpZM4Jj83l>
.
|
Awesome demos though. Thanks!
@francesco-vannini we were going to add demos/ script for getting it
working with the Linux hwclock stuff right? Maybe could be part of setup
script or something.
On 22 Jan 2017 8:47 pm, "tvoverbeek" <notifications@github.com> wrote:
Resynced with PiSupply/master. Will try to split it up in smaller pieces
and squashing commits so it is easier to merge.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADNCumICcSsH-4MfIy2Kl8gtBFta-KhUks5rU8BhgaJpZM4Jj83l>
.
|
Regarding the root check, you can check for the existence of /dev/gpiomem. If it does not exist use the existing 'you have to be root' code else continue without root. |
Does I2C or SPI require root privileges?
Thanks
…On 24 Jan 2017 3:35 pm, "tvoverbeek" ***@***.***> wrote:
Regarding the root check, you can check for the existence of /dev/gpiomem.
If it does not exist use the existing 'you have to be root' code else
continue without root.
Shall I provide a separate pull request for the root check in the examples
only?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADNCuoKyLWZ_UfRcNjUGrojmZOQ8-aLmks5rVho3gaJpZM4Jj83l>
.
|
I2C and SPI do not require root privileges. When you enable I2C and/or SPI access in raspi-config you get added to the relevant groups (i2c and spi) so you can access /dev/i2c-1 and /dev/spidev0.* |
Cool. Let's push this so we still support people on older OSs.
They are probably few and far between but still worth supporting.
…On 24 Jan 2017 8:19 pm, "tvoverbeek" ***@***.***> wrote:
I2C and SPI do not require root privileges. When you enable I2C and/or SPI
access in raspi-config you get added to the relevant groups (i2c and spi)
so you can access /dev/i2c-1 and /dev/spidev0.*
This has been the case for a long time. The rootless access to the gpio is
more recent
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADNCurjJE0MO3nTXe8T6cDj9XQf11ih_ks5rVlzagaJpZM4Jj83l>
.
|
Examples and explanation how to use the MCP7940N hardware clock on the Papirus HAT
As agreed all good with last commit which brings in only the RTC examples, documentation and support files. |
These examples look fantastic! Really really great work.
I'm just wondering whether they would be better placed under bin/rtc
directory instead of where they are, so it's easier to understand the
structure? And perhaps add then to the python module setup script too?
Possibly also should add some info to the main readme with a brief overview
of what's in the directory. Basically a summary of what's in the RTC readme
already?
…On 9 Mar 2017 6:29 pm, "Garage Tech" ***@***.***> wrote:
Merged #55 <#55>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADNCunD4EKtlqKhJMBzACR7sJqBWfVEcks5rkEUFgaJpZM4Jj83l>
.
|
@tvoverbeek - is the python smbus module not already included in Raspbian by default? Just needs to be imported? Do we definitely need to have the source code here? |
The smbus module is already in Raspbian, but does not allow you to access an i2c device if it is already claimed by the kernel. |
As for the folder structure we had already discussed it and decided we were
going to keep it this way as the RTC only really applies to the HAT. We can
always review things and structure later including the install script.
For the moment I thought it was important to make the code available.
…On 9 Mar 2017 19:20, "tvoverbeek" ***@***.***> wrote:
The smbus module is already in Raspbian, but does not allow you to access
an i2c device if it is already claimed by the kernel.
Hence a slightly modified version of smbus; smbusf (smbus forced access).
See the section "Accessing the MCP7940N from Python with the kernel driver
(rtc_ds1307) loaded" in the RTC-Examples README.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/APUu19iPG_eysIJ8OT0-f6istmcMr8snks5rkFDxgaJpZM4Jj83l>
.
|
Yeah definitely good to have the code live as I'm sure it'll be very
helpful to a lot of people.
About the structure....hmm....I see your point. Maybe the whole thing needs
an overhaul or maybe the RTC stuff in a different repo. Not really sure.
Let's have a think :-)
On 9 Mar 2017 9:26 pm, "Garage Tech" <notifications@github.com> wrote:
As for the folder structure we had already discussed it and decided we were
going to keep it this way as the RTC only really applies to the HAT. We can
always review things and structure later including the install script.
For the moment I thought it was important to make the code available.
On 9 Mar 2017 19:20, "tvoverbeek" ***@***.***> wrote:
The smbus module is already in Raspbian, but does not allow you to access
an i2c device if it is already claimed by the kernel.
Hence a slightly modified version of smbus; smbusf (smbus forced access).
See the section "Accessing the MCP7940N from Python with the kernel driver
(rtc_ds1307) loaded" in the RTC-Examples README.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or
mute
f6istmcMr8snks5rkFDxgaJpZM4Jj83l>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADNCurSQeBm0O9aeA-_fgxGKMmdeM7Amks5rkG54gaJpZM4Jj83l>
.
|
Examples and a lot of details about how to use the wake-on-alarm function and the interrupt function on GPIO 27. @shawaj. See video https://youtu.be/H8aviSTrx4Q. Also removed check for root on other demos (not needed any more on recent Raspbian)