The problem I have is as follows.
IDE: 1.8.2 V in windows
Arduino type: promini Atmega328 3.3V 8MHz
Element: 1 motor driver, 2 DC motors, 1 servo motor, 2 lithium polymer batteries.
Condition: servo lib. for servo motor, analogWrite func. for DC motor
//analogWrite pin:3, 5, 6, 9, 10, 11
int servo_pin = 5;
int right_motor_pin = 10;
int left_motor_pin = 11;
- Servo works well in alone code.
- Right DC motor works well in alone code.
- Left DC motor works well in alone code.
If driving three parts simultaneously, left motor doesn't work.
So, I change the pins to other PWM pins, one motor always doesn't work.
Each part works well in alone code, so hardware and software is OK, I think.
Is it impossible to use 1 servo and 2 dc motors in Arduino promini?
Or am i something missing?
Plz help me.....
Thank you for reading my topic.
If I add a myservo.attach(servo_pin) func in void setup,
then, left motor doesn't works.
But without myservo.attach(servo_pin) func in void setup,
then, left motor works.
In the opposite case,
with or without myservo.attach(servo_pin) func in void setup,
right motor always works.
Does PWM pins have an internal connection?