I have following wire as shown below, one end has male USB connector and other end has four wires. I know, when connected to laptop, the RED one acts as voltage source and BLACK as ground. If I give 2 bits data input to GREEN and YELLOW one, is there any software or API for (Python, C or any other language) to know about state of those two wires ? I mean to check if GREEN or YELLOW one have a voltage or not.
Please guide me if I am asking the wrong question.