I just installed below code on setup function
pinMode(D4, INPUT_PULLUP);
pinMode(D5, INPUT_PULLUP);
pinMode(D7, INPUT_PULLUP);
pinMode(D6, INPUT_PULLUP);
But it was running out 0,1,0,1 accordingly when called :
digitalRead(D4);
digitalRead(D5);
digitalRead(D6);
digitalRead(D7);
where is the mistake should got this kinds of issue ? my hardware pullup resister broken ?
I am fresher for hardware programming .
Are they completely dead or can you still e.g. digitalWrite(D7, HIGH) to turn on the blue LED?
To test digitalRead() capability you could just connect a digitalWrite pin to D4/D7 and check the readings when you toggle the output pin.
Hopefully you haven’t killed them completely
But for your question, you’d use the A-pins just the same as the D-pins.
Thx your reply , and I am sure now , the D4 & D7 are both killed in my hard work before, (in some midnight , almost sleep, still, was facing the hug complex circuit ,i just picked up a 220V AC wire, wired and wired again, suddenly, i smelled some burning smell…)
Please be careful when working with high-voltage AC/DC!!! As you have discovered high voltage AC/DC should never connect directly to a microcontroller!