# Arduino Mega - detection of rising edge and determination of signal period

**URL:** <https://forum.arduino.cc/t/arduino-mega-detection-of-rising-edge-and-determination-of-signal-period/949356>\
**Category:** Sensors\
**Created:** [January 20, 2022, 5:26pm UTC](https://forum.arduino.cc/t/arduino-mega-detection-of-rising-edge-and-determination-of-signal-period/949356 "2022-01-20T17:26:10Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![pylon](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@pylon](https://forum.arduino.cc/u/pylon)\
**Post date:** [January 24, 2022, 6:13pm UTC](https://forum.arduino.cc/t/arduino-mega-detection-of-rising-edge-and-determination-of-signal-period/949356/21 "2022-01-24T18:13:00Z")

</div>

> [@hzrnbgy](#):
>
> What happens if you keep sending data to the UART buffer faster than the hardware UART can print?

The code will block until the buffer gets cleared enough to hold the new content.  
But that's not the OP's main problem as such blocks would last much longer than what he experiences.  
The delay() call in loop() will ensure that there's enough time to send everything in the buffer.

---

<div class="post-metadata">

**Author:** ![hzrnbgy](https://avatars.discourse-cdn.com/v4/letter/h/90db22/32.png) [@hzrnbgy](https://forum.arduino.cc/u/hzrnbgy)\
**Post date:** [January 24, 2022, 6:24pm UTC](https://forum.arduino.cc/t/arduino-mega-detection-of-rising-edge-and-determination-of-signal-period/949356/22 "2022-01-24T18:24:57Z")

</div>

I was explaining to him that if he wanted to collect data at 1000 Hz (even using hardware timers), he must find a way to "send" or save that data, or there is no point in collecting that much if you can't send or save it fast enough

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [July 23, 2022, 6:25pm UTC](https://forum.arduino.cc/t/arduino-mega-detection-of-rising-edge-and-determination-of-signal-period/949356/23 "2022-07-23T18:25:44Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

[Previous page](https://forum.arduino.cc/t/arduino-mega-detection-of-rising-edge-and-determination-of-signal-period/949356.md?page=1)
