I have a for loop made by my teacher that dims (or brightens) an LED connected to a PIC18F2455. I have to make the code do both, first brighten, then dim it, but my C skills aren't good enough for this. How can I make this happen?
int count=500;
while(1){
for (int i=0; i<count;i++){
LED = 0;
for(int j=0;j<i;j++);
LED = 1;
for (int j=0;j<count-i;j++);
}
}