The only logic you should do in Arduino is to send input to the PC. Think of it as if you were creating a generic controller to use in any game. It should output things like “analogX=-0.5; analogY=0.23”.
Then, in Unreal, you code to make it understand that “controller” input. I’d do that in a Blueprint that doesn’t need to know about your specific character. It just outputs the inputs from Arduino. That way, you could use that Blueprint for any project with your custom Arduino controller.
Then, after that is set up, you create a GameMode Blueprint, a PlayerController Blueprint and a Character/Pawn Blueprint.
Make the GameMode’s default classes be your custom PlayerController and Character Blueprints. Then, on your PlayerController, you use the inputs Blueprint to send commands to your Character Blueprint. Your Character Blueprint will have functions like “MoveForward”, “Jump” etc, and the Player Controller calls those functions on it when the correct inputs come from the Arduino Blueprint. This way, your Character is not tied to one specific type of control, only your PlayerController is. And your PlayerController could be replaced by another one that controls your Character using different inputs. Or even control more Characters via possession/unpossession.
That’s why there’s this pattern of GameMode, PlayerController and Pawn in Unreal. To make things independent of each other and easily reusable.
If you don’t care about being organized, you could just make everything I just said in the Character Blueprint, but if you’d like to reuse it some day on another project, with a totally different character, you will curse your past self for it haha