I have some knowledge about Arduino, but it's my first time using solo microcontrollers and this sort of thing, i have no idea of what i should do in this case.
I'm following a guide that users ATTiny13 with a Led and an LDR sensor, but i don't have that microcontroller, so i'm using a ATmega328P-PU, which has a slightly different pinout.
I searched a lot and found many important stuff, but i can't figure out what to do here.
The project i'm doing uses this guide.
The code is commented with the three pins: LDR sensor, LED and some other pin with a resistor, or something like that.
// use PB2 for led, pin 7 #define LED_BIT 2 // use PB3 to enable ldr, pin 2 #define ADC_ENA_BIT 3 // use ADC2, PB4, pin 3 #define CHANNEL 2
The ATmega datasheet shows PB, PC and PD pins, but ATtiny has only PB, i don't know what i should do and which ports are equal to each other.
Basically, i need to know which pins on ATmega i should use as an alternative to the ones on ATtiny13 in the code.