Control 2 digital inputs and 2 outputs by PC with no need for microcontroller.
Using USB to serial module to drive 2 outputs that can be LEDs or relays, also read 2 digital inputs from a switch or a DC source. The app uses the Hardware Controls of the USB to Serial module; inputs CTS, DSR and outputs DTR, RTS (not all USB to Serial modules have all these connections).
Free IDE for B4J: https://www.b4x.com/