I don't know what's the problem
hello guys, thats 1st topic! bad... have troubles simple codes... here provide code wrote today 5 min seems incorrect:
int x=255;
int led=9;
void setup() {
// put setup code here, run once:
pinmode(led,output);
}
void loop() {
// put main code here, run repeatedly:
while(x=0){
analogwrite(led,x);
x=x-1;
delay(3);
if (x=0) {
while(x=255){
analogwrite(led,x);
x=x+1;
delay(3);
}
}
}
}
this code should fade led on pin 9 255 0 , after reaching x=0 x should raise
again 255 , forever.
p.s. new this...
please, in comments below, describe exact problem , provide code repaired.

int x=255;
int led=9;
void setup() {
// put setup code here, run once:
pinmode(led,output);
}
void loop() {
// put main code here, run repeatedly:
while(x=0){
analogwrite(led,x);
x=x-1;
delay(3);
if (x=0) {
while(x=255){
analogwrite(led,x);
x=x+1;
delay(3);
}
}
}
}
this code should fade led on pin 9 255 0 , after reaching x=0 x should raise
again 255 , forever.



p.s. new this...
please, in comments below, describe exact problem , provide code repaired.
Arduino Forum > Using Arduino > Programming Questions > I don't know what's the problem
arduino
Comments
Post a Comment