SensorLib 0.5.1
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
aw9523_keypad_5x7.ino File Reference
#include <IoExpanderDrv.hpp>
Include dependency graph for aw9523_keypad_5x7.ino:

Go to the source code of this file.

Macros

#define SENSOR_SDA   17
 
#define SENSOR_SCL   18
 
#define SENSOR_IRQ   10
 

Functions

void onKeyboardInterrupt ()
 
void scanKeyboard (bool state[ROW_COUNT][COLUMN_COUNT])
 
const char * specialKeyName (uint8_t row, uint8_t column)
 
void printKeyName (uint8_t row, uint8_t column, bool symbolLayer)
 
void reportChanges (const bool current[ROW_COUNT][COLUMN_COUNT])
 
void setup ()
 
void loop ()
 

Variables

IoExpanderAW9523 expander
 
volatile bool keyboardInterrupt = false
 
bool keyState [ROW_COUNT][COLUMN_COUNT] = {}
 

Detailed Description

Author
Lewis He (lewis.nosp@m.he@o.nosp@m.utloo.nosp@m.k.co.nosp@m.m) @license MIT
Date
2026-09-23

AW9523 5x7 interrupt-driven keyboard matrix example.

Rows: P0_0-P0_4 (open-drain outputs) Columns: P0_5-P0_7 and P1_0-P1_3 (inputs with external pull-ups) INTN: Active-low open-drain output; connect it to SENSOR_IRQ.

Definition in file aw9523_keypad_5x7.ino.

Macro Definition Documentation

◆ SENSOR_IRQ

#define SENSOR_IRQ   10

Definition at line 24 of file aw9523_keypad_5x7.ino.

◆ SENSOR_SCL

#define SENSOR_SCL   18

Definition at line 20 of file aw9523_keypad_5x7.ino.

◆ SENSOR_SDA

#define SENSOR_SDA   17

Definition at line 16 of file aw9523_keypad_5x7.ino.

Function Documentation

◆ loop()

void loop ( )

◆ onKeyboardInterrupt()

void onKeyboardInterrupt ( )

Definition at line 62 of file aw9523_keypad_5x7.ino.

References keyboardInterrupt.

Referenced by loop(), and setup().

◆ printKeyName()

void printKeyName ( uint8_t  row,
uint8_t  column,
bool  symbolLayer 
)

Definition at line 101 of file aw9523_keypad_5x7.ino.

References specialKeyName().

Referenced by reportChanges().

◆ reportChanges()

void reportChanges ( const bool  current[ROW_COUNT][COLUMN_COUNT])

Definition at line 121 of file aw9523_keypad_5x7.ino.

References keyState, and printKeyName().

Referenced by loop().

◆ scanKeyboard()

void scanKeyboard ( bool  state[ROW_COUNT][COLUMN_COUNT])

◆ setup()

◆ specialKeyName()

const char * specialKeyName ( uint8_t  row,
uint8_t  column 
)

Definition at line 90 of file aw9523_keypad_5x7.ino.

Referenced by printKeyName().

Variable Documentation

◆ expander

IoExpanderAW9523 expander

Definition at line 58 of file aw9523_keypad_5x7.ino.

Referenced by scanKeyboard(), and setup().

◆ keyboardInterrupt

volatile bool keyboardInterrupt = false

Definition at line 59 of file aw9523_keypad_5x7.ino.

Referenced by loop(), onKeyboardInterrupt(), and setup().

◆ keyState

bool keyState[ROW_COUNT][COLUMN_COUNT] = {}

Definition at line 60 of file aw9523_keypad_5x7.ino.

Referenced by reportChanges(), and setup().