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 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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs time programming
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: kurthjwerner
  • Date Created: 15 Feb 2017 4:40 PM Date Created
  • Views 399 views
  • Likes 2 likes
  • Comments 2 comments
Related
Recommended

time programming

kurthjwerner
kurthjwerner
15 Feb 2017

I need to know how to program the intern timer, or does a timer not excist in the Ras Pi?

 

I must  learn to program the  GPIO´s together with the intern timer:

 

Here is my task: time based programming of the GPIO4

 

It is a starting maskin for sailboat racing:

 

To start the program, i have an extern switch, that even starts the first signal (hooter)

After 60 seconds, the program must set the GPIO4 high again (for appr. 30 milliseconds).

Then, after 120 seconds, the program must set GPIO4  high again ( ”      ” ”  ”       )   to give a third signal.

Finally, after 60 seconds, the program must set the GPIO4 high again ( ”  ”   ”    ” ) for the final start

signal hooter for all boats.

I´m very exited, programming this little wonder maskin, and i would be very thankfull to you guy´s, if

you would be able to help me now!

(i´ve three other projects, when i finished this one!!)

  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 8 years ago +1
    Hi Kurt, The Pi runs Linux which provides the timing functions to applications. These functions are identical regardless the underlying hardware. This is important to know, because it then helps when searching…
  • beacon_dave
    beacon_dave over 8 years ago +1
    This example may be of interest clock_gettime() For Acurate Timing – Raspberry Pi Projects
  • beacon_dave
    beacon_dave over 8 years ago

    This example may be of interest

    clock_gettime() For Acurate Timing – Raspberry Pi Projects

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 8 years ago

    Hi Kurt,

     

    The Pi runs Linux which provides the timing functions to applications.

    These functions are identical regardless the underlying hardware.

    This is important to know, because it then helps when searching for resources; you're not restricted to searching for Pi-specific information related to timing, instead you can search for information based on the language you wish to use in Linux.

     

    Having said that, it could be too soon to specify the sequence and timing you need. To take a step back, choose a language you're comfortable with (e.g. Python, C, etc) and then examine how to control the GPIO, and examine the time features available in an API offered in that language.

    Some languages and middleware even provide higher-layer capabilities that are timing related (e.g. automatically execute code at a certain rate).

    If you're open to trying any language, check out MagPi online magazine, it has loads of Pi-related beginner tutorials that address GPIO but also example games and apps, and the principles could be extended after playing with the basics.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • 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