I have been trying to learn how to acess the input and output pins of the arduino WITHOUT using analogRead and analogWrite, etc.
a lot of AVR tutorials recommend calling pins like this:
DDRD &= ~(1<<PD2); //Configure PORTD pin 2 as an input
PORTD |= (1<<PD2); //Activate pull-ups in PORTD pin 2
DDRB |= (1<<PB5);
However, I can’t ever get pin names like PD2 or PB5 to work. any idea why?