RT-Thread-Studio / sdk-bsp-ra8d1-vision-board

The Vision-Board development board, based on the Renesas Cortex-M85 architecture RA8D1 chip.
38 stars 30 forks source link

How to use KEY0 (p201) or USER/BOOT (p907) pins in openMV #115

Closed wrj163 closed 5 hours ago

wrj163 commented 5 days ago

help help help already define in rtconfig.h:

define OPENMV_USING_KEY

define USER_KEY_PIN_NAME "p907"

but: pin0 = Pin([“P9”, 7], Pin.IN, Pin.PULL_UP) NameError: name not defined

pin0 = Pin('p907', Pin.IN) ValueError: Pin id must be tuple of ("GPIO_x", pin#)

Rbb666 commented 2 days ago

help help help already define in rtconfig.h: #define OPENMV_USING_KEY #define USER_KEY_PIN_NAME "p907"

but: pin0 = Pin([“P9”, 7], Pin.IN, Pin.PULL_UP) NameError: name not defined

pin0 = Pin('p907', Pin.IN) ValueError: Pin id must be tuple of ("GPIO_x", pin#)

Look at this link:https://github.com/RT-Thread-Studio/sdk-bsp-ra8d1-vision-board/blob/master/projects/vision_board_openmv/firmware/omv_example/key_irq.py