You can do the digitalRead of the same pin that you have the digitalWrite (I've not sure if this method works, but you can try it). If the last method don't work, you can connect together an input and an output and then read with the input if the output is HIGH or not.
I think is what you're looking for, right?
Yeah, that seems to be the easiest way, I hope it will work thank you man.
Now, I am using the SoftwareSerial library, to send the value of the DigitalRead(pin) through bluetooth on another device I would have to use the function << BluetoothData=Lukebt.read(pin);>> ?Note: SoftwareSerial Lukebt(4, 3); Lukebt is how I initialized the softwareserial
Do you mean you want to see if the pin is set high, or if there is actually voltage there?
The only way a pin can be set high is when you do it with a write, so you already know that it's high: your suggestion if using a flag seems to me to be the right way of remembering. It's very common in the forum to see states set like that. Just after you set the pin high, set a boolean variable high as well. Seems to me to be strange to read the pin to see if it's high, since you're the one who set it in the first place and all you have to do is remember that fact.
If you mean you want to see if the pin is actually high, ie there's actually 5V there, then I guess you could connect it to another pin and read that one.
You're right too, but the main problem it is that the pin of arduino i am referring to, can be slaved by different devices through bluetooth, so let's make an example : Device 1 (call it A) set the pin on state 1, switching ON the led associated with it . Now device 2 (call it B) can set the pin on state 1 or 2, but if we don't have a real time "answer" from arduino about the state of this pin, B doesn't know if he got to set the pin on state 1 or 2, in order to effectively change the state of the led.
I hope you got better what I mean now, and thank you guys for your answers, I appreciate your big help!