Since I didn’t have any effective output devices like LEDs with me,
I tried to use UE as my output terminal, combining Arduino with UE5 to experiment with a simple circuit.
I chose the most direct and simple method: serial communication — UE Blueprints.
First, I downloaded the GitHub plugin:
https://github.com/videofeedback/Unreal_Engine_SerialCOM_Plugin/tree/main
This plugin is specifically designed for communication between Arduino and UE, and it’s called Serial Communication Plugin.
How to load this plugin into a UE project?
Finally, drag the Blueprint file into the scene, locate it in the Outliner, and then edit the Blueprint.
可以看到在蓝图中可以调整i相应的波特率以及串口等数值。
蓝图中可能出现的错误是,当关闭了实时链接时,并没有关闭端口。
为了避免这种情况的发生,蓝图设定了在项目运行时,按下Q关闭串口,按下空格打印字符,按下Z重新开启串口。
成功联通!