Hey, im super new to coding so sorry for this noob question. I have the arduino and im coding in C.
I simply cant figure out why my code isnt working.
Hopefully you guys can helpCode:#define F_CPU 16000000UL #include <avr/io.h> #include <util/delay.h> void setup(void); void blink(void); int main(void) { setup(); while (1) { if(PIND0 == 1) { blink(); } } } void setup(void) { DDRB = 0x3f; DDRD = 0x00; } void blink(void) { PORTB ^=0x3f; _delay_ms(250); }
Thanks!