ESP32
ESP32, GPIO, gpio_intr
CoyoteUgly
2018. 8. 22. 13:30
ESP32, GPIO, gpio_intr
ESP32 보드에서 BOOT 라벨의 버튼이 GPIO_0 이므로 이를 사용하였고
LED는 GPIO_5 에 연결하여 테스트를 진행하였습니다.
소스에서 사용하는 gpio 관련 설정은 아래 Header 파일을 참고하면 됩니다.
esp-idf\components\driver\include\driver\gpio.h
esp-idf\components\esp32\include\esp_intr_alloc.h
0. 참고 사이트
- esp-idf\examples\peripherals\gpio
- https://github.com/espressif/esp-idf/tree/master/examples/peripherals/gpio
- https://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/gpio.html#
1. 모듈
2. 보드 연결
3. 소스 설명
4. 소스
https://github.com/sglee0223/esp32/tree/master/gpio_intr
5. 결과 확인
버튼을 누르면 Low 이므로 LED off
버튼을 떼면 High 이므로 LED on