Arduino code uploaded success but nothing happens arduino uno

They aren't errors. They are warnings. I suspect you have compiler warnings turned down or off.

Go to the "Preferences..." page and set "Compiler warnings:" to "All". When you compile again you will get helpful warnings that point out where you are doing something that doesn't look quite right to the compiler. Warnings point to code the is not a syntax error (so it WILL compile), but it is fairly likely that it is not doing what you think it is doing.

1 Like

So your case stuff is still messed up?
I thought you had a look at the syntax.

1 Like

before i though it was okay, but since i never turn to "all" of compiler warnings. message done uploading but not working

after knowing all data of warning's, what should i do next? thank you

All warnings are resolved?

Does it work?

If not, why do you keep the code secret?

Fix the problems with switch/case as previously suggested

1 Like

sorry what kind of code i keep secret! everithing i posted above.

No, the last posts of you were compiler output of a broken sketch.

I have not seen a sketch that produces no warnings.

1 Like

I don't need a compiler to see all the warnings, a ton of "label not used"

Somewhere\DamnedIRemote.ino: In function 'void loop()':
Somewhere\DamnedIRemote.ino:88:24: warning: statement has no effect [-Wunused-value]
       case1: 0xBA45FF00;//motor1 power on/off speed=0 ("one_btn")
                        ^
Somewhere\DamnedIRemote.ino:94:24: warning: statement has no effect [-Wunused-value]
       case2: 0xE718FF00;//motor1 speed up (up_btn)
                        ^
Somewhere\DamnedIRemote.ino:101:24: warning: statement has no effect [-Wunused-value]
       case3: 0xAD52FF00;// motor1 speed down (down_btn)
                        ^
Somewhere\DamnedIRemote.ino:108:24: warning: statement has no effect [-Wunused-value]
       case4: 0xBB44FF00;//motor2 power on speed 0 "four_btn"
                        ^
Somewhere\DamnedIRemote.ino:114:24: warning: statement has no effect [-Wunused-value]
       case5: 0xA55AFF00;//motor2 speed up (FORWARD_btn)
                        ^
Somewhere\DamnedIRemote.ino:121:24: warning: statement has no effect [-Wunused-value]
       case6: 0xF708FF00;// motor2 speed down (REWIND_btn)
                        ^
Somewhere\DamnedIRemote.ino:88:7: warning: label 'case1' defined but not used [-Wunused-label]
       case1: 0xBA45FF00;//motor1 power on/off speed=0 ("one_btn")
       ^~~~~
Somewhere\DamnedIRemote.ino:94:7: warning: label 'case2' defined but not used [-Wunused-label]
       case2: 0xE718FF00;//motor1 speed up (up_btn)
       ^~~~~
Somewhere\DamnedIRemote.ino:101:7: warning: label 'case3' defined but not used [-Wunused-label]
       case3: 0xAD52FF00;// motor1 speed down (down_btn)
       ^~~~~
Somewhere\DamnedIRemote.ino:108:7: warning: label 'case4' defined but not used [-Wunused-label]
       case4: 0xBB44FF00;//motor2 power on speed 0 "four_btn"
       ^~~~~
Somewhere\DamnedIRemote.ino:114:7: warning: label 'case5' defined but not used [-Wunused-label]
       case5: 0xA55AFF00;//motor2 speed up (FORWARD_btn)
       ^~~~~
Somewhere\DamnedIRemote.ino:121:7: warning: label 'case6' defined but not used [-Wunused-label]
       case6: 0xF708FF00;// motor2 speed down (REWIND_btn)
       ^~~~~

You seem to have no clue how a proper switch case statement is structured.
Look that up again.

1 Like

what do you want that i need to do to give you infomation required

@delbandung

Fix the wrong syntax you use in switch/case, such as this example

     case1: 0xBA45FF00;//motor1 power on/off speed=0 ("one_btn")
1 Like

Try what I told you in Reply #62:

1 Like

Dear Mr. Wasser,
i wrote :

switch (value) {

  case 0xBA45FF00:
         digitalWrite(motor1pin1, !digitalRead(motor1pin1));
         digitalWrite(motor1pin2, LOW);
         analogWrite(motor1pin3, mSpeed1);
         break;

  case 0xE718FF00://motor1 speed up (up_btn)
         Serial.println("UP");
         mSpeed1 += 10;
         if (mSpeed1 > 255) 
         mSpeed1 = 255;
         analogWrite(motor1pin3, mSpeed1);
         break;

  case 0xAD52FF00:// motor1 speed down (down_btn)
         Serial.println("DOWN");
         mSpeed1 -= 10;
         if (mSpeed1 < 0) 
         mSpeed1 = 0;
         analogWrite(motor1pin3, mSpeed1);
         break;

  case 0xBB44FF00://motor2 power on speed 0 "four_btn"
         digitalWrite(motor2pin1, !digitalRead(motor2pin1));
         digitalWrite(motor2pin2, LOW);
         analogWrite(motor2pin3, mSpeed2);
         break;

  case 0xA55AFF00://motor2 speed up (FORWARD_btn)
         Serial.println("FORWARD");
         mSpeed2 += 10;
         if (mSpeed2 > 255) mSpeed2 = 255;
         analogWrite(motor2pin3, mSpeed2);
         break;

  case 0xF708FF00:// motor2 speed down (REWIND_btn)
         Serial.println("REWIND");
         mSpeed1 -= 10;
         if (mSpeed2 < 0) mSpeed2 = 0;
         analogWrite(motor2pin3, mSpeed2);
         break;
   default:
  Serial.println("UNRECOGNIZED");
  break;

...and the result was . . ?

(This topic was marked as solved around the mid 40s)

wait i still test, some hardware got problem. only one motor(motor 2) working but rewind or reverse direction not working. still in test and checking

i got message like below :

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Deli\AppData\Local\Temp\arduino_build_42090/sketch_test_onemotor.ino.hex"
avrdude: writing flash (11416 bytes):

Writing | ################################################## | 100% 2.04s

avrdude: 11416 bytes of flash written

avrdude done. Thank you.

i am using ch341 bootloader, what are the meaning of that message (BOLD) thank you

It means the programmer thinks that the processor on your board is an AVR m328p.

(Please can you revoke the "solved" status)

1 Like

sorry how to revoke the"solve status" ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.