rszimm / sprinklers_pi

Sprinkling System Control Program for the Raspberry Pi
GNU General Public License v2.0
310 stars 100 forks source link

Adding a Real Time Clock while using Sprinklers_Pi #108

Closed wehix closed 5 years ago

wehix commented 6 years ago

Hi, After spending an hour trying to get my Real Time Clock DS1307 working with my RPi Zero W and Sprinklers_Pi I just realised BCM2 (SDA) and BCM3 (SCL) are used for Zones 8 and 9. My installation only uses up to Zone 6. Is there any way I can regain the use of those GPIO ports for SDA and SCL? Thanks, Bill H

nhorvath commented 6 years ago

Yes, in settings.h set NUM_ZONES to 6, then recompile/reinstall. Your settings should be fine to keep using but anything over 6 may disappear. Alternatively, you can edit the 2nd ZoneToIOMap (the one in the #else) in core.cpp and change the pins that conflict.

On Sat, Feb 3, 2018 at 10:36 AM, wehix notifications@github.com wrote:

Hi, After spending an hour trying to get my Real Time Clock DS1307 working with my RPi Zero W and Sprinklers_Pi I just realised BCM2 (SDA) and BCM3 (SCL) are used for Zones 8 and 9. My installation only uses up to Zone 6. Is there any way I can regain the use of those GPIO ports for SDA and SCL? Thanks, Bill H

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/108, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3PjrDmbSJDiNP1PeLVSPcasWdR84ks5tRHzggaJpZM4R4NS0 .

wehix commented 6 years ago

Hi Nick, Thanks for your quick reply ! I've gone with the easier option and edited core.cpp changing the line as you suggested. 8-->21 and 9-->22 however I still get 3.3v on both Pins 3 & 5, dropping to 0v when their respective Zone is on. Is there something I'm missing? Incidentally, after looking through the code files earlier I picked that would of been the line in core.cpp to edit, but needed confirmation. As a newbie to the world of Pi, I'm not quite up to compiling and reinstalling yet, is there much to it?

Regards, Bill H

nhorvath commented 6 years ago

I would make sure you reset your pi if you've run the old one as the pins were previously initialized.

On Sat, Feb 3, 2018 at 12:05 PM, wehix notifications@github.com wrote:

Hi Nick, Thanks for your quick reply ! I've gone with the easier option and edited core.cpp changing the line as you suggested. 8-->21 and 9-->22 however I still get 3.3v on both Pins 3 & 5, dropping to 0v when their respective Zone is on. Is there something I'm missing? Incidentally, after looking through the code files earlier I picked that would of been the line in core.cpp to edit, but needed confirmation. As a newbie to the world of Pi, I'm not quite up to compiling and reinstalling yet, is there much to it?

Regards, Bill H

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/108#issuecomment-362834657, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3Kj2EpT3Q7kmijCQPAdfg_eTTA3rks5tRJHHgaJpZM4R4NS0 .

wehix commented 6 years ago

How is a reset best achieved? Using hte reset options within Sprinklers_Pi or a reinstall?

Cheers, Bill

nhorvath commented 6 years ago

No i just mean restart the hardware (reboot). The other thing to check is make sure that you changed the right ZoneToIoMap. Also the Pi 0 might have different pinouts than the ones we are using which are based on the Pi 2/3... it might be another zone causing the issues. Sorry I can't be more specific I've never tried a Pi0.

On Sat, Feb 3, 2018 at 12:32 PM, wehix notifications@github.com wrote:

How is a reset best achieved? Using hte reset options within Sprinklers_Pi or a reinstall?

Cheers, Bill

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/108#issuecomment-362837917, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3G4vBZbCCt5IC7NU1dIPNiVBOEUNks5tRJgZgaJpZM4R4NS0 .

wehix commented 6 years ago

Hi Nick, Many thanks for your help. Great product BTW ;-) As an alternative, how would I go about recompiling and installing settings.h? This is an unknown to me.

Kind regards, Bill H

nhorvath commented 6 years ago

Same as you did with core.cpp. The wiki has building instructions, follow the upgrade one.

On Feb 3, 2018 8:13 PM, "wehix" notifications@github.com wrote:

Hi Nick, Many thanks for your help. Great product BTW ;-) As an alternative, how would I go about recompiling and installing settings.h? This is an unknown to me.

Kind regards, Bill H

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/108#issuecomment-362871319, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3K9q_THuiPOd1FJ5CzqkIWKZ9Gvgks5tRQQ6gaJpZM4R4NS0 .