Tag Archives: timer

Arduino and ultra sonic range measurement module or how to measure the pulse time with a hardware timer and an interrupt

SEN136B5B is a Ultra Sonic range measurement from SeedStudio. It can measure the distance by sending a 40k Hz ultra sound impulse via the transmitter  and calculating time needed for echo to reach receiver. Detecting range: 3cm-4m. More information about device.

In the description of module is mentioned that it is compatible with Arduino library, but I decided to write program without using PulseIn command.

Continue reading

Arduino 4 digits 7 segments LED countdown timer with buzzer

After sorting out  how works 16 bit hardware timer it is time for 4 digits countdown timer. Having 16 bit timer and  7 segments LED code from earlier only were remaining to write timer’s modes (run/setup) and button’s control code.  After putting  all code to one place there is countdown timer with properties below:

  • Maximum 99 minutes 59 seconds countdown interval
  • 1 second resolution
  • Sound indication with buzzer for finished countdown
  • LED indicates running timer, or relay instead  for powering external devices for some period of time
  • 2 buttons to set timer and start/pause/reset.

This time without additional code quotation, please find some code explanation within code, so code bellow.

Continue reading