cancel
Showing results for 
Search instead for 
Did you mean: 

reading arrow key from UART

Crane
Associate III

Hello, has anyone ever used UART to read arrow key?

I tried using STM32 MCU on CubeIDE, but can only get two characters ASCII number 27 and 91 and couldn't get the third character which is supposed to be 'A' for Up key, 'B' for Down key, 'C' for right key or 'D' for left key.

I tried using GNC compiler on PC and it worked.

4 REPLIES 4

Depends what your Terminal application actually sends.

The STM32 UART is agnostic about what you transmit in the 8-bit data byte

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Crane
Associate III

Ok. I tried PuTTY and Tera Term. They are same.

Perhaps your code is losing characters, the STM32 is capable of doing this without data loss, and seeing all characters on the wire.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Ok, let me check where the issue comes from. Thanks a lot Tesla!