So I connected SD card module to my arduino autonomous mapping robot, to get the speed of my motors to text file.
So I got two problems:
First one:
When I start my robot with SD inserted to the SD module, only one motor is running, so the robot spinns in circle. But when I start my robot without SD inserted both motors runs fine. That is happening on PC USB power and on external power.
Second one:
When my robot is started by computer USB, SD works properly and data is saved to SD card.
But on external power SD card doesnt even create file.
What can cause these problems? I guess that these problems are connected to each other.
Please post your full sketch. If possible, you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's OK to add it as an attachment. After clicking the "Reply" button, you will see an "Attachments and other settings" link.
Please always do an Auto Format (Tools > Auto Format in the Arduino IDE or Ctrl + B in the Arduino Web Editor) on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.
When your code requires a library that's not included with the Arduino IDE please post a link (using the chain links icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.