Code failure to control TB6612FNG motor driver

Thanks for your reply,

i am so sorry it was just because i didnt put the 10k resistors to input pins, as i say i am new :slight_smile:


i add the picture of my board. i connect 5v directly the input pins. as i say i didnt do it before so i am probably wrong but i wanna fix it.

i connect potansiometer to a3

other pins like below. i write directly pin numbers tu understand easily,

I used 4 5 pins to direction motor 1, 6 7 pins to direction motor2

as you see pins 2, 3 and 12 inputs.
when i touch the 5v on board to that pins it works, i can read from serial port screen, when i release the signal, it doesnt change maybe 4 seconds,

i thought maybe program cycle is too much but it cant be 4 second and potansiometer is changing exact time i can see it, so i didnt understand why when i release 5vd from input pins it doesnt change its condition at the same time. and also somehow when i didnt touch anything i can see a short time inputs comes then goes, just a moment and pess or when i give one of input, the other ones comes and goes also.

pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(12, INPUT);
  
pinMode(8, OUTPUT);

pinMode(9, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);

pinMode(10, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);

pins-arduino.jpg