![]() |
Core2 for AWS IoT Kit BSP 1.5.1
|
The button library provides convenience functions to interact with the virtual buttons drawn over specified areas of the front of the device. There are three virtual buttons aligned to the circles etched on the front of the Core2 for AWS IoT Kit reference hardware.
To enable this feature using KConfig, use the command pio run --environment core2foraws --target menuconfig from within the root of the project directory in your PlatformIO terminal window and go to the menu Component Config --> Core2 for AWS features to set the features you want to enable.
The following example initializes the Core2 for AWS, which initializes the PMU for the battery and other user enabled hardware features — such as the FT6336U and virtual touch buttons. It then creates a FreeRTOS task of priority 1 that prints "MIDDLE PRESSED!" using the ESP logger if the middle button touch is pressed.