Hello, ssmc.
What you are describing sounds like you have a power problem where your power supply cannot source enough current to start the motor spinning. Can you try using a different power supply? The “weird behaviors” are probably your system responding to the power supply voltage dropping.
If the the source code works with Arduino Uno R2, then it should work fine with the Arduino Uno R3.
- Ryan