AgTalk Home
AgTalk Home
Search Forums | Classifieds | Skins | Language
You are logged in as a guest. ( logon | register )

DIY auto boom height control
View previous thread :: View next thread
   Forums List -> Precision TalkMessage format
 
WildBuckwheat
Posted 6/13/2019 22:09 (#7557812 - in reply to #7557645)
Subject: RE: DIY auto boom height control


Middlesex County, Ontario
You capture and record the time when the signal goes high, then capture and record the time the signal goes low, subtract the high time from the low time, and you have the duration.

There is a built in and very easy function called pulsin() that returns the length of a pulse on a pin in microseconds. https://www.arduino.cc/reference/en/language/functions/advanced-io/p...

A more robust (and more advanced) way to do it is with interrupts.
Top of the page Bottom of the page


Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete cookies)