JJRobots COMMUNITY

Full Version: B-Robot with PRO MICRO
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all.
I try to make a BROBOT version with a PRO MICRO and change port 12 to port 6 but I have some trouble with the stepper motor 2 working and the controls.
Can any help what changes I must make in the coding. All things are tested individually by Arduino examples and seems working. Must be the code change to port 6 who are wrong. I also stuck with servo 2 on port 9. Any ideas. ?

- in file BROBOT_EVO2.ino

pinMode(4, OUTPUT); // ENABLE MOTORS
pinMode(7, OUTPUT); // STEP MOTOR 1 PORTE,6
pinMode(8, OUTPUT); // DIR MOTOR 1 PORTB,4
pinMode(6, OUTPUT); // STEP MOTOR 2 PORTD,7 ??????????
pinMode(5, OUTPUT); // DIR MOTOR 2 PORTC,6

pinMode(10, OUTPUT); // Servo1 (arm)
pinMode(9, OUTPUT); // Servo2 not works too. ?????

- in file BROBOT_EVO2.ino
pinMode(12, OUTPUT); -> pinMode(6, OUTPUT);

- in file Control.ino
SET(PORTD, 6); // STEP MOTOR 2 -> SET(PORTD, 7); ???????
CLR(PORTD, 6); -> CLR(PORTD, 7); ???????

Thanks in advance, Gorm
[attachment=233]
(09-29-2017 09:48 AM)gamba Wrote: [ -> ]Hi all.
I try to make a BROBOT version with a PRO MICRO and change port 12 to port 6 but I have some trouble with the stepper motor 2 working and the controls.
Can any help what changes I must make in the coding. All things are tested individually by Arduino examples and seems working. Must be the code change to port 6 who are wrong. I also stuck with servo 2 on port 9. Any ideas. ?

- in file BROBOT_EVO2.ino

pinMode(4, OUTPUT); // ENABLE MOTORS
pinMode(7, OUTPUT); // STEP MOTOR 1 PORTE,6
pinMode(8, OUTPUT); // DIR MOTOR 1 PORTB,4
pinMode(6, OUTPUT); // STEP MOTOR 2 PORTD,7 ??????????
pinMode(5, OUTPUT); // DIR MOTOR 2 PORTC,6

pinMode(10, OUTPUT); // Servo1 (arm)
pinMode(9, OUTPUT); // Servo2 not works too. ?????

- in file BROBOT_EVO2.ino
pinMode(12, OUTPUT); -> pinMode(6, OUTPUT);

- in file Control.ino
SET(PORTD, 6); // STEP MOTOR 2 -> SET(PORTD, 7); ???????
CLR(PORTD, 6); -> CLR(PORTD, 7); ???????

Thanks in advance, Gorm
Hi,
I built my third robot using the same Pro Micro card, which you can see in my post after yours. If you are interested I can email to you my wiring diagram and modified software, to compare it with yours.
My email : bonoracarlo@libero.it
[quote='Carlo1951' pid='2949' dateline='1506692243']
[quote='gamba' pid='2948' dateline='1506678532']
Hi all.
I try to make a BROBOT version with a PRO MICRO and change port 12 to port 6 but I have some trouble with the stepper motor 2 working and the controls.
Can any help what changes I must make in the coding. All things are tested individually by Arduino examples and seems working. Must be the code change to port 6 who are wrong. I also stuck with servo 2 on port 9. Any ideas. ?

- in file BROBOT_EVO2.ino

pinMode(4, OUTPUT); // ENABLE MOTORS
pinMode(7, OUTPUT); // STEP MOTOR 1 PORTE,6
pinMode(8, OUTPUT); // DIR MOTOR 1 PORTB,4
pinMode(6, OUTPUT); // STEP MOTOR 2 PORTD,7 ??????????
pinMode(5, OUTPUT); // DIR MOTOR 2 PORTC,6

pinMode(10, OUTPUT); // Servo1 (arm)
pinMode(9, OUTPUT); // Servo2 not works too. ?????

- in file BROBOT_EVO2.ino
pinMode(12, OUTPUT); -> pinMode(6, OUTPUT);

- in file Control.ino
SET(PORTD, 6); // STEP MOTOR 2 -> SET(PORTD, 7); ???????
CLR(PORTD, 6); -> CLR(PORTD, 7); ???????

Thanks in advance, Gorm
Hi,
I built my third robot using the same Pro Micro card, which you can see in my post after yours. If you are interested I can email to you my wiring diagram and modified software, to compare it with yours.
My email : bonoracarlo@libero.it
---------------
Dear Carlo.

I will be really happy if you can send me your diagram and code so I can compare.
It really would be a big help. Thanks in advance. Best regards, Gorm

gorm.gamba@gmail.com
Hi i am also trying to build a robot on arduino for micro, can you please send me your code?
Thank you
Paw
can you please send me your code? I am also very concerned about this issue!
maryanatolia@gmail.com
I have made progress. My BRobot Clone can self standing now and relatively stable. I now need to add the WIFI portion. B-Robert uses ESP12 but most of the GPIO pins are not used. I am just wondering if ESP01 also work for this purpose.
Reference URL's