element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Installing Code for PiFace Real Time Clock
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 52 replies
  • Answers 4 answers
  • Subscribers 665 subscribers
  • Views 5643 views
  • Users 0 members are here
  • raspberry_pi
Related

Installing Code for PiFace Real Time Clock

fc-element
fc-element over 8 years ago

Dear Element 14 Community.

All my Raspberry Pi devices (RPi 2, RPi Zero, and RPi 3 (planned) are running with the current Raspbian Jessie version. I have successfully installed PiFace Real Time Clock using the PiFace website instructions and GitHub.com software download on a number of RPi 2's and one of my three RPi Zero's.

 

I have recently continued the installations on another two RPi's and cannot continue because after these two lines:

1. chmod +x install-piface-real-time-clock.sh

2. sudo ./install-piface-real-time-clock.sh

 

The following new comments are returned: 1

1.. create new pifacertc init script to load time from PiFace RTC

2. Adding /etc/init.d/pifacertc .

3. install the pifacertc init script

4. enable I2c by using raspi-config

 

As I am a Linux beginner, can someone lead me through (expand) the coding of these lines so I may install PiFace RTC currently and in the future. The changelog on GitHub refers to a revision change but I am not knowledgable enough to understand why the install went through previously by not currently.

 

Thank you very much,

Frank.

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    0 Former Member over 8 years ago

    Please note that the /etc/init.d folder is for the use of system service platforms like Upstart and Systemd (latest).  I would not put a script there.  If you want some low-level service to automatically start during the Linux boot process, the file /etc/rc.local is a better place to do this (somewhere before the `exit` command that is delivered in the installed rc.local).  On the other hand,  I cannot see the "GitHub.com software" you are talking about because you didn't mention the URL.  Please publish this.

     

    This one?

    https://github.com/jhowie/FreeBSDPiFaceRTC

     

    That one states to put the start up command in rc.local (good advice).

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Former Member
    0 Former Member over 8 years ago

    Please note that the /etc/init.d folder is for the use of system service platforms like Upstart and Systemd (latest).  I would not put a script there.  If you want some low-level service to automatically start during the Linux boot process, the file /etc/rc.local is a better place to do this (somewhere before the `exit` command that is delivered in the installed rc.local).  On the other hand,  I cannot see the "GitHub.com software" you are talking about because you didn't mention the URL.  Please publish this.

     

    This one?

    https://github.com/jhowie/FreeBSDPiFaceRTC

     

    That one states to put the start up command in rc.local (good advice).

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • fc-element
    0 fc-element over 8 years ago in reply to Former Member

    Dear texadactyl

    I just now saw your referral to another website I can try and I will do so in the net hour. I don't now if this will be successful. I've never seen this on the web and it appears that I'll have to learn- not knowing what BSD means right now. I'd appreciate your comment about using this method instead of the one descibed below.

    But as to your comment " I cannot see the "GitHub.com software" you are talking about, here is the following:

    Starting Website to Add PiFace Real Time Clock
    http://www.piface.org.uk/products/piface_clock/

    Two Links (located towards bottom of site) were followed:

    1. Documentation (downloaded pdf File)

    2. PiFace Real Time Clock on GitHub
    https://github.com/piface/PiFace-Real-Time-Clock

    Restating the issue
    Previous installations of PiFace RTC on both RPi 2 and RPi Zero following the procedure listed above have worked successfully.

    Currently, during the installation of additional RPi Zero devices. I ran into a problem which prevented me to continue.
    After the command:

    chmod +x install-piface-real-time-clock.sh 

    no problem was rncountered. However after I added:

    sudo ./install-piface-real-time-clock.sh

    The following four lines were returned:

    create new pifacertc init script to load time from PiFace RTC
    Adding /etc/init.d/pifacertc .
    install the pifacertc init script
    enable I2c by using raspi-config
    (and also suggestions as how to inable I2C.

    Within https://github.com/piface/PiFace-Real-Time-Clock, the changemod lists two versions (revisions): v0.2.0 which involves /etc/init.d/pifacertc script and v0.1.0 which involves the /etc/rc.local script. I thoroughly agree that rc.local is the best "option" since this is the path that worked in the past (I guess).

    As I am a Linux beginner, is there any method to select or "grab" the first version or,  solving the present issue, can someone give me the line-by-line coding of the first two lines which involve the script creation so I may install PiFace RTC in the future. This is the one you have not recommended.

    Ill be glad to explain further if there still is a miscommunication on my part.
    Frank.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 8 years ago in reply to fc-element

    I didn't mean that using an /etc/init.d/x script was invalid; it just runs the risk of becoming inoperative in the future if the service manager changes.  That is why user-level applications should avoid infrastructure folders unless they are willing to provide a methodology and documentation for each service manager in use by Unix and Linux.  I have done this too so I am no angel.  image

     

    "BSD" usually refers to University of California at Berkeley Unix as late as the 1980s, a precursor to Linux and MacOSX (based on BSD 4.4).

     

    Okay, I have seen the script.  It looks clearly written and very modular although it only provides a service start function (no stop or reload).  I'll stop being picky. 

     

    Having tried it myself, I just found out that this script is dependent on the OS being Raspbian.  Since I am currently running Ubuntu MATE on my Raspberry Pi, I could not go further.  It fails for me when it correctly diagnoses that the raspi-config service is missing.  I'll get out of the way and let you get help from folks who are using Raspbian.  Sorry that I couldn't be of more help.  If you have any general Linux questions, I can help you with that.  Maybe, I'll go back to Raspbian when I have a chance in the future.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube