element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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 697 subscribers
  • Views 7471 views
  • Users 0 members are here
  • raspberry_pi
Related

Installing Code for PiFace Real Time Clock

fc-element
fc-element over 9 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
  • Jan Cumps
    0 Jan Cumps over 9 years ago in reply to Former Member

    tru dat

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Jan Cumps

    Solve your (tweeted) Windoze 10 problem?  Deepest sympathies.

     

    /bin/rm -rf windoze

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 9 years ago in reply to Former Member

    I must not be the only one, because a emergency update the day after fixed it.

    what I didn't appreciate is that the recovey point mechanism was turned off, and my recovery points (I make one before installing new software) were gone.

     

    Anyways. I work with Linux and Unix on the job and that ain't a dream world eather image.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • fc-element
    0 fc-element over 9 years ago in reply to Jan Cumps

    Dear Ms. Jan Cumps,

    I apologize for initially brought your name (incorrectly) into this thread. I read the very first line of the thread and didn't realize that you may be the forum administrator overseer. To answer your question, you did not reply, comment or create any post. However, this gives me the opportunity to mention the rapid and accurate responses from this environment.

    Thank you Frank.

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

    Dear Ms. Tozer,

    I have copied and will act upon the procedure you have clearly and extensively described to me. I will attempt to apply it in the near future. My Many Thanks.

     

    I will also run your suggestion: " Can you enable the i2c port using the raspi-config command and then do:

    ls /dev

    You should see either i2c-0 or i2c-1 in the list, could you let us know which one it is please."

     

    I hope your suggestions by "Richard" and Peter Oajkes did not cause undo interruptions in your activities. As for your side comments (which I did not follow), I only hope it involves healthy interaction within this friendly community.

     

    Frank

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to fc-element

    Not an Admin but one of the Evil Minions of the Top Members Guild... even worse image, without a master, chaos reigns,  Give us a purpose and nothing will get in our way, not even our master image

     

    Muhaahaahaahaa

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 9 years ago in reply to fc-element

    Hi Frank, as Peter says, I'm not and admin here.

    And I'm not an RPi expert eather, so if you read something that looks like advice in an RPi thread, and it's written by me, just ignore it image.

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

    Dear Ms Tozer,

     

    I had successfully copied your code into my main folder with : cd~/ and wget instructions.

    the pifacertctest.sh was listed and I could open it and see your code.

    However, when I typed:

    sudo ./pifacertctest.sh

    the return was:

    sudo: ./pifacertctest.sh :command not found

    so I went ahead and typed:

    chmod +x ./pifacertctest.sh

    the return was:

    chmod: cannot access './pifacertctest.sh ': no such file or directory

     

    Am I missing a simple word, command or instruction ?. please comment.

    NOTE:

    Also I added these commands on the device I was using before (which already had an install-piface-realtimeclock.sh file next to the pifacertctest.sh.)

    I did not know if i2c was enabled or if spi was still enabled. I have attached my internet board, an enc28j60, which required enabling spi . A WiPi dongle is also attached.

     

    ADDED NOTE:

    Thinking that something was basically wrong, I re-installed a fresh Jessie distribution on the device after deleting all files an re-formatting.

    I ran: sudo apt-get update and sudo apt-get upgrade, adjusted time zone and keyboard.through sudo raspi-config.

     

    I am now at the fresh  point where I need you to comment on why the system could not find your file . I am sorry for the added problem, your suddestions . . .

    frank-Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago

    Hah! Thats just linux being pig headed, run the chmod command using sudo like below. The idea being that if a user doesn't have permission to execute a file then the system isnt going to confirm that files existence either so rather than saying permission denied, it just says file not found etc... It discourages repeat attempts at illegally executing files I think!

     

    sudo chmod +x ./pifacertctest.sh

     

    Ive just completed the steps of downloading using wget, then sudo chmod etc.. to test it out and can confirm it does work using sudo!

     

     

     

     

     

     

     

     

     

    edit (the below is nothing to do with the question, its just some further reading!!)

    --------------------------------------------------------------------------------------------------------------

    The chmod case can be quite confusing, if you are interested here is an explanation why we need to use sudo chmod in this case.

     

    1) If we use chmod +x ./pifacertctest.sh the file becomes executable for the logged in user, on the raspberry pi that user is called "pi"

    2) We need to execute the file using sudo ./pifacertctest.sh using sudo means we are no longer acting as the user "pi" but we are acting as the user "root" (or with root user privileges)

    3) because the pifacertctest.sh has been made executable for the user "pi" and NOT the user "root" when we try and execute it with root priviliges (sudo), the root user doesn't have the executable permission

    4) if we use sudo chmod +x ./pifacertctest.sh the file becomes executable for the root user, this is because we used sudo

    5) Now the root user has permission to execute the file, its now possible to do with sudo ./pifacertctest.sh

    6) if the script didnt need executing with root privileges (sudo) then we wouldnt have to sudo chmod.

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

    Dear Ms. Tozer,

    You were correct about permissions. The command sudo chmod +x ./install pifacertctest.sh apparently worked. I now have in my /home/pi folder
    (in yellow gold)

    install-piface-real-time-clock.sh
    pifacertctest.sh
    (among other files in blue)

    The following is a rundown of the command line staements (Input) and replies (Output) within the teminal.

    Input: ls /dev
    Output: Many files, mostly ram##'s, alot of tty## 's, some vcsa#'s and loop#'s and another dozen.
    (None that look like mcpXXXXXXX's ARMyyyyyyyy's or microprocessor names.)

    Two positive returns:

    Input: ls /dev | grep "i2c"
    Output: i2c-1

    Input: sudo i2cdetect -l
    Output: i2c-1 i2c   20804000.i2c   I2C Adapter

    Several replies showed failures:

    Input: sudo systemctl start pifacertc
    Output: (abreviated) Failed to start service, failed to load, and/or not found

    Input: sudo systemctl start pifacertctest
    Output: (abreviated) Failed to start service, failed to load, and/or not found

    Input: sudo systemctl is-enabled pifacertc
    Output: (abreviated) Failed to start service, failed to load, and/or not found

    Input: sudo systemctl-a
    Output: (abreviated) Failed to start service, failed to load, and/or not found

    cat /proc/cpuinfo

    ARMv7-comp processor rev 7
    2.85
    half .....
    )x41
    7
    0x0
    0xb76
    7
    BCM2708 (this may be an identifier)
    900092    (this may be an identifier)
    0000000070ec5112

    in your screenshot on one of your replies

    Input: /sys/class/i2c-dev/i2c-1/device/new-device
    Output: no reply

    I must tell you that within my /boot/config.txt file, both i2cand spi are enabled
    dtparam=spi=on
    dtparam=i2c_arm=on

    can both be working simultaneosly?

    Thats all I tried to do to up to this point.

    I hope you understand the above and will be glad to do any other experiments
    you put forth. Please ask questions. I believe the pifacertctest will eventually be successful.

    However, at this point, I dont know how the integration of the github.com/piface/PiFace-Real-Time-Clock install can be invoked along with pifacertctest install since the naming between the two is different and the two code listings are inherently incompatible (maybe a poor word choice).  I wondered if you had an overall solution (vision) in mind.

    Sorry for the bother and If you do not have time to continue, please tell me.
    Thanks continually, Frank.

    • 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 © 2026 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