OVMS3-idf/examples/peripherals/gpio
Angus Gratton 800bffb8b0 cmake: Add CMakeLists.txt files for all examples
Generating using convert_to_cmake.py, with some minor cleanup
2018-04-30 09:59:20 +10:00
..
main bugfix: io setting useless when io_num > 32 2017-12-04 17:35:00 +08:00
CMakeLists.txt cmake: Add CMakeLists.txt files for all examples 2018-04-30 09:59:20 +10:00
Makefile Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
README.md Fix markdown and format of GPIO example README 2017-11-07 20:27:10 +01:00

Example: GPIO

This test code shows how to configure gpio and how to use gpio interrupt.

GPIO functions:

  • GPIO18: output
  • GPIO19: output
  • GPIO4: input, pulled up, interrupt from rising edge and falling edge
  • GPIO5: input, pulled up, interrupt from rising edge.

Test:

  • Connect GPIO18 with GPIO4
  • Connect GPIO19 with GPIO5
  • Generate pulses on GPIO18/19, that triggers interrupt on GPIO4/5