hey i am trying to write a c code for digital input.
i am trying to get the current State of the digital input.
Are there functions that i can use in order to get the current State so i can run them in while loop.
this is what i am trying to do
while(1)
{
cout << "do you want to know the state? (ENTER 1)";
cin >> know;
if(know==1)
{
cout << State;
}
}