Reputation: 59
I have done my project finally :) , but i noticed that the arduino board on startup it's some digital pins goes high for a bit time 1 seconds or little more! and this causes problem in my project because i'm using it in starting dc motor. I forgot to mention that i have 2 relays connected with arduino and they are triggered on arduino startup or with resetting it, then my code works perfectly. I tried doing pull up resistor and pull down resistor but it seems same situation. Also tried (INPUT_PULLUP) and no result.
Any suggestion please?
Upvotes: 5
Views: 2127
Reputation: 720
I had the same problem when booting the arduino/connecting to a power source. Only using digitalWrite(pin, LOW)
in void setup()
did not work for me.
Every pin needs to be connected to a physical pull-down 10kOhm resistor in parallel to whatever you're controlling.
Upvotes: 2