• This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22636

    mikethechap
    Participant

    I was reviewing the material on the real time clock (RTC) that Ray posted here: http://rayshobby.net/mediawiki/index.php?title=Set_Up_RPi,_RTC,_WiFi,_Data_Log.

    Ray referred back to the Adafruit discussion here. On the Adafruit page it says that the Wheezy or Occidentalis v.01 distributions don’t have the necessary RTC module or the DS1307 module.

    So, does anybody at this time have a working RTC using Wheezy? Will Ray’s instructions work with Wheezy?

    Thanks for any help. I’m thinking about putting an RTC on my OSPi.

    [EDIT] If anyone used Occidentalis v.02, did you follow Ray’s instructions as detailed above? How did it work out?

    #25536

    Dan in CA
    Participant

    Mike,

    The OpenSprinkler Pi board already has an RTC on-board.

    When I first started working with it I used the following to access the clock:

    “FYI
    after a few different iterations, here are the settings I used to access the RTC:

    1. added following lines to /etc/modules (sudo nano /etc/modules)

    i2c-bcm2708
    rtc-ds1307

    2. added following line to /etc/rc.local
    for a 256MB Raspberry Pi Model B:

    echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device

    for a 512MB Raspberry Pi Model B (i2c-0 is changed to i2c-1):

    echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

    3. Reboot

    must be root or use sudo:
    to read clock:

    hwclock -r

    set the hardware clock from the current system time:

    hwclock -w

    set the system time from the hardware clock:

    hwclock -s 

    ‘I haven’t tried setting it up according to the instructions on the Wiki. It says to add

    hwclock -s

    to /ect/rc.local which will set the system time from the RTC at boot but I am not sure if the system will keep updating the time from the network. If so the instructions don’t say how to update th RTC from the network.

    The way it should work is that the system uses the RTC if the network is not available but the RTC should be kept up to date from the network otherwise.

    Occidentalis is a custom Linux distro developed by Adafruit for educational purposes. I haven’t tried it but if you do, please let us know your experience.

    Dan

    #25537

    mikethechap
    Participant

    Thanks, Dan!

    The OSPI connected to the sprinkler is running wheezy. I am using Occidentalis on another Pi. but that RPi isn’t connected to the OSPi board. I’ll try and check it out tomorrow and see if it works okay.

    The wheezy kernel did fine using your instructions. The glitch was not observing the integer 1 in the following instructions for the 512 RPi board:

    echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

    Thank you!

    As soon as I get a chance I’ll try the Occidentalis with the OSPi board.

    #25538

    KanyonKris
    Participant

    Is the real time clock very important?

    If the Pi has even a flaky internet connection it will get regular time updates via NTP to keep it’s clock accurate.

    One user reported his Pi drifting forward 12 seconds per day without NTP. Could be worse depending on temperature, etc. Let’s say it gains 30 seconds per day, that’s still only 5 minutes every 10 days. I wouldn’t care if my watering drifted that much or more, others may. And I doubt my internet connection would be down that long.

    But what if the Pi’s ethernet/WiFi konks out? I may not notice that. An RTC, like the one on the OpenSprinkler board, would help here. Since I’m using relays I better rig up a ping test to alert me when the sprinkler Pi can’t be reached.

    Other thoughts / comments?

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.