Thanks for help I solved my problem ahahaah that was realy easy.
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(0, OUTPUT);
pinMode(A0, INPUT);
}
// the loop function runs over and over again forever
void loop() {
if (digitalRead(A0) == HIGH) {
digitalWrite(0, LOW);
}
else {
digitalWrite(0, HIGH);
}
}
I think the processor was confused because I wrote the pins PA0 where it says A0. I guess the problem was fixed when I just typed A0. Actually, it was very simple. I'm so sorry for taking all of your precious time XD