{"id":3607,"date":"2022-10-17T11:30:06","date_gmt":"2022-10-17T10:30:06","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=3607"},"modified":"2022-10-17T11:30:07","modified_gmt":"2022-10-17T10:30:07","slug":"heartbeat-timer","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/microcontrollers\/programming-in-c-c\/timing-programming-in-c-c\/heartbeat-timer","title":{"rendered":"Heartbeat timer"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">A non-irq based heartbeat timer<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">In your main loop<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>\t\tHeartbeatTimer();\r\n\r\r\n\t\tif (Do10msFunctions)\n\t\t{\r\n\t\t\t\/\/-----------------------------\r\n\t\t\t\/\/----- DO 10mS FUNCTIONS -----\r\n\t\t\t\/\/-----------------------------\r\n\t\t\tDo10msFunctions = 0;\r\n\r\r\n\r\n\t\t}<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Heartbeat timer function<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>\t\tHeartbeatTimer();\r\n\r\n\t\t\/\/Switches1New = 0;\r\n\t\tif (Do10msFunctions)\r\n\t\t{\r\n\t\t\t\/\/-----------------------------\r\n\t\t\t\/\/----- DO 10mS FUNCTIONS -----\r\n\t\t\t\/\/-----------------------------\r\n\t\t\tDo10msFunctions = 0;\r\n\r\n\t\t\t\/\/----- READ SWICHES -----\r\n\t\t\t\/\/read_switches();\r\n\r\n\t\t}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A non-irq based heartbeat timer In your main loop Heartbeat timer function<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[185],"tags":[],"class_list":["post-3607","post","type-post","status-publish","format-standard","hentry","category-timing-programming-in-c-c"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/3607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=3607"}],"version-history":[{"count":1,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/3607\/revisions"}],"predecessor-version":[{"id":3608,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/3607\/revisions\/3608"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=3607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=3607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=3607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}