Question regarding connecting with devices

Hey there!

Is there a way to make a machine detect something in Unreal Engine, specifically a variable in a blueprint? How might I (I understand this is complicated, so it doesn’t have to be that detailed of a response) go about doing this, in general? Is there some sort of Bluetooth/export function?

As an example:
There is a VR set that has a light connected to it. Every time a variable is 1, the light is on. When the variable is 0, the light is off.

There’s some Arduino plugins for UE4, you could easily control a light with an Arduino and control that from UE4.