Thanks, although that was a pretty obnoxious way help.
Perhaps, but you'll live.
If I seemed a bit harsh on you it is because you should have known that already if your breadboarding an H-Bridge.
I have to hand it to you, you're doing pretty good for such a newbie to be building a discrete H-bridge and having it work right off the bat, but if you are going to build circuits, you really should do a little more research first.
Let me explain the reason. The motors are inductors . One of the characteristics of an inductor is that upon the application of power, there is an INRUSH current, that, depending on the size of the inductor, can be quite extreme. What this does to the arduino power is it robs the regulator of voltage long enough for the voltage to spike below the allowable level for the system and it does a reset to recover. As long as your arduino is powered by the USB or an external power source, it should be ok.
If you want a suggestion, add LED indicators to your circuit for DIR (four) and PWM (two). You'll find it handy because if anything goes wrong or when your testing your software, you will immediately see that the direction status is incorrect (or correct) if you have a mistake in your code or if for some reason the circuit doesn't seem to be working correctly you can rule out hardware
or software by looking at the leds. It's faster than checking it with a meter.
Good luck with your projects, and try not to be too sensitive. Just learn from it and move on. No one is trying to insult you. We're just trying to emphasize the importance of something. I think you'll get over it.