Hi everybody. I already posted this topic but I still have not find solution.
I want to use the bitRead function: Serial.println(bitRead(PORTD,3)); //Reads bit 3 of register PORTD which contains the current state (high/low) of pin 3. It works fine. I need to replace PORTD with a variable like variable="PORTD" (because I want to read different ports depending of differents conditions in my sketch)
String variable ="PORTD"; Serial.println(bitRead(variable,3)); //doesn't work How can I do that