esp-idf/examples/16_pcnt
Angus Gratton 3cfe738fcf Merge branch 'bugfix/minor_issues' into 'master'
Bugfixes from Github

Many small fixes for open github issues.

See merge request !334
2016-12-28 13:18:34 +08:00
..
main
Makefile
README.md

README.md

Example: pcnt

This example uses the pulse counter module (PCNT) to count the rising edges of pulses generated by the LED Controller module (LEDC).

By default GPIO18 is used as output pin, GPIO4 is used as pulse input pin and GPIO5 is used as control input pin. This configuration (pin numbers, etc.) can be modified in top of the main/pcnt_test.c file.

  • Open serial port to view the message printed on your screen
  • To do this test, you should connect GPIO18 with GPIO4
  • GPIO5 is the control signal, you can leave it floating with internal pulled up, or connect it to ground. HIGH = Count increases, LOW = count decreases.
  • An interrupt is configured to trigger when the count reaches threshold values.
  • The counter will reset when it reaches the limit values.