Core2 for AWS IoT EduKit BSP  1.4.0
Button (virtual)

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 EduKit 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 hardware enable 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.

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "core2foraws.h"
#include "ft6336u.h"
#include "button.h"
static const char *TAG = "EXAMPLE";
static void touch_task(void* pvParameters){
vTaskDelete(NULL); // Should never get to here...
void app_main(void){
xTaskCreatePinnedToCore(button_task, "buttonTask", configMINIMAL_STACK_SIZE * 3, NULL, 1, NULL, 1);
Functions for the virtual buttons using the FT633U touch controller.
uint8_t Button_WasPressed(Button_t *button)
See if the specified button was pressed.
Definition: button.c:43
Functions to initialize and access Core2 for AWS IoT EduKit hardware features.
void Core2ForAWS_Init(void)
Initializes the power chip with default values, enables battery charging, and initializes all enabled...
Definition: core2forAWS.c:32
Button_t * button_middle
Middle virtual touch button.
Definition: core2forAWS.c:86
Functions for the FT6336U capacitive touch panel controller.

Enumerated Type Definitions