Make motor move as soon as I power up the Arduino

I've been looking this examples or code but couldn't find anyone.

How to move the motor as soon as I power up my Arduino??

I think that you are going to have to provide a lot more information. What have you tried?

What type of motor? How is the motor connected to the Arduino? What type of Arduino? How is the Arduino powered? How is the motor powered? What do you mean by "as soon as" ? One minute, one second, one millisecond, one microsecond, one nanosecond?

Arduinos tend to execute their bootloader and some initialization code before the "normal" code [e.g., setup() function and loop() function] gets to execute. Are you looking to replace this?

To post code and/or error messages:

  1. Use CTRL-T in the Arduino IDE to autoformat your complete code.
  2. Paste the complete autoformatted code between code tags (the </> button)
    so that we can easily see and deal with your code.
  3. Paste the complete error message between code tags (the </> button)
    so that we can easily see and deal with your messages.
  4. If you already posted without code tags, you may add the code tags by
    editing your post. Do not change your existing posts in any other way.
    You may make additional posts as needed.

Before posting again, you should read the three locked topics at the top of the Programming Questions forum, and any links to which these posts point.

If your project involves wiring, please provide a schematic and/or a wiring diagram and/or a clear photograph of the wiring.

Good Luck!

With 11 posts, even a "Newbie" should know to provide more information and should know how to properly post.