Hi everyone, I'm fairly new to programming and using arduino to learn. I noticed that I had made a mistake in my program which was that I never declared pins I was using to control a double H bridge as OUTPUT's in my void setup but things still worked out as planned. I did declare them as int's at the start of my code and think this has something to do with why it still worked.
I have since fixed the "error" that was not causing me any trouble as every tutorial I have read/seen says this is the way to do it but was wondering if anyone could tell me why it still worked and why we declare the pins if they don't need to be?
I'm using an ATMEGA 2560.
Thanks for your time.