home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.sys.raspberry-pi      Raspberry Pi computers & related hardwar      26,127 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 24,328 of 26,127   
   Michael Schwingen to The Natural Philosopher   
   Re: Need help with PI PICO...   
   24 Mar 24 13:36:38   
   
   From: news-1513678000@discworld.dascon.de   
      
   On 2024-03-24, The Natural Philosopher  wrote:   
   >   
   > ...unless, thinking a bit more, the pulse is so short it comes *and*   
   > goes inside that loop, as you suggested.. it certainly should *not*  be,   
   > as even on a few cm of target distance, its hundreds of microseconds (i   
   > make it 58µs per cm roughly)   
      
   Start a hardware timer when sending the pulse, and set up an interrupt on   
   the input with the return pulse. In the interrupt handler, read the timer   
   value and set a flag for the main routine that the measurement is complete.   
      
   If you add a timer interrupt to periodically send the start pulse, the whole   
   measurement operation runs in parallel to whatever the main program is   
   doing, without blocking anything.   
      
   cu   
   michael   
   --   
   Some people have no respect of age unless it is bottled.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca