Hi everyone.
I need to control the gear motor's velocity with muy Arduino Uno. I know Arduino can supply 5V and I think it's enough to move the motor.
I made this diagram:
My intention is just move two motors. The diagram has 4.
I connected all this things and the potientiometer works well. The screen shows the correct values but the motor doesn't work.
The transistor is bc547 b
And my code is:
int cntrl = 5;
int pot = 0;
void setup() {
pinMode(cntrl, OUTPUT);
Serial.begin(9600);
}
void loop() {
float lvl = map(analogRead(pot), 0, 1023, 40, 255);
analogWrite(cntrl, lvl);
Serial.println(lvl);
}
Could you help me please?
Thanks