I've just started to code with my Atmega16. Wanted to try out RGB diode and i cant understand why won't it work .. What's the reason ?
INB4:
>> your style suck
>> you are retared
>> kill yourself
I've just started to code with my Atmega16. Wanted to try out RGB diode and i cant understand why won't it work...
Other urls found in this thread:
atmel.com
twitter.com
The compiler doesn't understand when the comments aren't in English.
>writing non-english comments ANYWHERE in your code
Please don't ever do that. Everything in English, always. You never know when you have to share it with someone who doesn't speak your language, like now.
as long as you are "The compiler" let me translate it for you. 1st - library for ports 2nd - time delay
will do it next time
Okay. Now there's an error.
What's wrong with non english comments?
English is the only language every programmer should know at least basics of, so even broken english is way better than any other language. Remember that other people may read your code.
I'm going to do it next time.. sorry
So what's the error ?
>English is the only language every programmer should know
Agree
>other people may read your code
Only if you publish it
show us your circuitry
>So what's the error ?
Take OP's example. When he wrote those comments he probably didn't intend to publish it anywhere, but he got stuck and he wants other people to read his code. You never know.
...
...
why would you do this?
To do what ? this circuitry ? As a begginer i wanted to start with a diode - now i wanted to try RGB diode but only 2 out of 3 colors are working and i have no idea why.
just connect every feet to a gpio pin and change the color trough pwm
>Atmega16
lmao yeah whatever forget about that
you did not initialized delay btw.
atmel.com
You need
#define F_CPU UL
before you include delay.h
Example for 8MHz:
#define F_CPU 8000000UL
#include
well my delay do work in ms.
I think connecting the anode of the LED would help.
dont be so smart - i've tried to change PORTC to PORTD still nothing. in order to take this picture i unplugged the ANODE
Why the fuck would you take the picture like that if you're trying to show us how it's connected? Anyway, we're not doing your homework, go back to or something.