What do if arduino reset itself?

What I can do if led on pin 13 is always turn on?

The LED on pin 13 always being on doesn't necessarily indicate any problem at all. You may just have uploaded a sketch to your board that turns the LED on.

Please provide a detailed description of the problem you're having.

pert:
The LED on pin 13 always being on doesn't necessarily indicate any problem at all. You may just have uploaded a sketch to your board that turns the LED on.

Please provide a detailed description of the problem you're having.

It is not problem with that. I try to test mpu6050 and led on pin 13 is always on. This test example is from electronoobs page. In code there isn't command that turn led 13 on.

pert:
The LED on pin 13 always being on doesn't necessarily indicate any problem at all. You may just have uploaded a sketch to your board that turns the LED on.

Please provide a detailed description of the problem you're having.

I try new code and it works now. Thank you for your suggestion.

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

What i can do if arduino reset itself?

Stop doing whatever is making it reset.

Could bd the sketch - writing off thed end of an array usually causes it to reset.

The board resets when you open serial monitor (or most other serial consoles) - if this is a problem, put a 10uF cap between reset and ground after uploading sketch; you must remove it to upload new code.

Excessive load on power can cause resets.

DrAzzy:
Stop doing whatever is making it reset.

Could bd the sketch - writing off thed end of an array usually causes it to reset.

The board resets when you open serial monitor (or most other serial consoles) - if this is a problem, put a 10uF cap between reset and ground after uploading sketch; you must remove it to upload new code.

Excessive load on power can cause resets.

Thanks for suggestion I will try this.

DrAzzy:
Stop doing whatever is making it reset.

Could bd the sketch - writing off thed end of an array usually causes it to reset.

The board resets when you open serial monitor (or most other serial consoles) - if this is a problem, put a 10uF cap between reset and ground after uploading sketch; you must remove it to upload new code.

Excessive load on power can cause resets.

Will I connect - of cap to gnd and + of cap to reset?

KarlaSvalina:
Will I connect - of cap to gnd and + of cap to reset?

Correct. Note that this is only about preventing resets when you open Serial Monitor. It will not help with resets caused by bugs in your code or insufficient power supply.

Note that you will need to remove the capacitor to upload a new sketch to your Arduino board.

KarlaSvalina:
It is not problem with that. I try to test mpu6050 and led on pin 13 is always on. This test example is from electronoobs page. In code there isn't command that turn led 13 on.

Pin13 is also the SCK pin, so when SPI is in use, it will flicker when SPI is actively transferring data, and stay on (or off depending on the SPI mode used) when not transferring data.

DrAzzy:
Pin13 is also the SCK pin, so when SPI is in use, it will flicker when SPI is actively transferring data, and stay on (or off depending on the SPI mode used) when not transferring data.

Ok. Thanks I forget this. I used nrf24 on atmega328 as arduino on beadboard and on arduino uno, on uno led 13 doesn't blink on atmaga328 blink, and radio communication doesn't work. Do you know why?

KarlaSvalina:
Ok. Thanks I forget this. I used nrf24 on atmega328 as arduino on beadboard and on arduino uno, on uno led 13 doesn't blink on atmaga328 blink, and radio communication doesn't work. Do you know why?

Upload blink, measure voltage on pin 13 - it should be going between 0v and 5v every second. If it's not, the board is damaged - either pin13 is blown, or the opamp is blown and the inputs are near-short to ground (the uno drives the LED with an opamp configured as a buffer, so the LED doesn't load the pin; the other opamp in the dual opamp IC is used as a comparator for the power switching circuit). The opamp is one of the parts more likely to be damaged by electrical abuse (on official boards and clones that use 16u2 as serial interface, that is also very easily damaged), and when it fails, it usually fails with all pins being nearly-shorted to ground.