Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Leonardo micro board
06-08-2015, 09:10 PM
Post: #1
Leonardo micro board
Is it possible change script fot Leonardo micro or Arduino Pro mini board? Timers section is hard for me Sad
I want make small robot, about half of size, so regular Leonardo is too big.
Find all posts by this user
Quote this message in a reply
06-10-2015, 07:39 PM
Post: #2
RE: Leonardo micro board
Hi, sasa9999.
Excuse me, but regular Leonardo (big) and Pro Micro (small) have the same pinouts and it is not necessary to change the sketch.
Another thing, if you want to make timers advanced features... For example, one timer control both motors and additionally serve them well sonar HC-SR04.
Find all posts by this user
Quote this message in a reply
06-12-2015, 02:16 PM (This post was last modified: 06-12-2015 03:10 PM by sasa999.)
Post: #3
RE: Leonardo micro board
Leonardo mirco haven't D12 . How to connect motor driver "step" pin? Is it possible assign different pin for motor driver "step"?
I have this one http://www.ebay.com/itm/381229599644?_tr...003wt_1123
Or, maybe it is possible migrate to Nano board - it have D12

[Image: 523a1765757b7f5c6e8b4567.png]

[Image: b_robot.png]
Find all posts by this user
Quote this message in a reply
06-12-2015, 03:32 PM
Post: #4
RE: Leonardo micro board
(06-12-2015 02:16 PM)sasa999 Wrote:  Leonardo mirco haven't D12 . How to connect motor driver "step" pin? How to assign different pin for motor driver "step"?

Sorry, I was wrong saying that the boards are identical.
That's not all differences - even pin A5 not out.
I'll try to help you...

1. See my post. I have the same board and I reappointed optimal conclusions, in my opinion.
2. Next post dedicated to the measurement of the battery voltage. Look at it. If you choose my option - write to me. If you are satisfied with the original version of the sketch, then just put it in a function analogRead (5) instead of the number 5 you have chosen the analog input (port).
Find all posts by this user
Quote this message in a reply
06-12-2015, 04:15 PM (This post was last modified: 06-12-2015 04:39 PM by sasa999.)
Post: #5
RE: Leonardo micro board
Tnx for help! Sad I tried change original sketch but something goes wrong. Sad It is difficult to understand exactly what piece of code must be changed Sad
Have you full sketch in one file? For Leonardo micro.
Find all posts by this user
Quote this message in a reply
06-12-2015, 04:57 PM (This post was last modified: 06-12-2015 05:59 PM by KomX.)
Post: #6
RE: Leonardo micro board
I suggest you use a signal STEP MOTOR2 pinout D6. Ok?

Open sketch BROBOT.ino.
Replace string
Code:
pinMode(12,OUTPUT); // STEP MOTOR 2 PORTD,6
to string
Code:
pinMode(6,OUTPUT); // STEP MOTOR 2 PORTD,7

Replace all strings PORTD,6 to PORTD,7.

After the stepping motor has to operate.

Strings analogRead (5) search for a file JJROBOTS_BROBOT.cpp
Find all posts by this user
Quote this message in a reply
06-12-2015, 05:24 PM
Post: #7
RE: Leonardo micro board
Tnx. I will try Smile
Find all posts by this user
Quote this message in a reply
06-13-2015, 10:27 PM (This post was last modified: 06-14-2015 09:28 AM by sasa999.)
Post: #8
RE: Leonardo micro board
Tnx KomX, motors work fine, BUT...
..when switched ON (USB connected) robot started, but after some time (maybe 10 seconds, maybe 20) it stay halted, but when I open serial monitor it continue run again. It not stop with serial monitor is open, but stop when serial monitor is closed therefore I can't detect problem. I use original sketch, only output D12 changed to D6. When it halted servo didn't respont too. Often motor continues rotate at constant speed - sometime faster, sometime slowly. Remote not responding.
So, how to detect problem? How to check what exactly? HELP PLEASE!
Find all posts by this user
Quote this message in a reply
06-14-2015, 09:46 AM (This post was last modified: 06-14-2015 09:56 AM by KomX.)
Post: #9
RE: Leonardo micro board
Interesting observation. I also noticed problems with the USB. For example, when you close the COM-monitor board continues to work with COM-port.
The only thing I did not understand that you stop there?

In your amendment:
Let's start with the installation of the board, or near it, but short and thick wires electrolytic capacitor 1000-4700 uF 16V.
Also the head broke, why rangefinder begins to limit the range of fifty centimeters during operation of motors. Oh, and every driver on the engine capacity of 220-470 uF 25V
Find all posts by this user
Quote this message in a reply
06-14-2015, 12:54 PM (This post was last modified: 06-14-2015 08:07 PM by sasa999.)
Post: #10
RE: Leonardo micro board
(06-14-2015 09:46 AM)KomX Wrote:  Interesting observation. I also noticed problems with the USB.
Very often I need wait 2..3.. or 5 minutes until Arduino Ide find com port for Leonardo board. I have 1.6.4 Arduino IDE.
.
About robot freezing. Tried with three separate batteries - one for motors 11.1V lipo and second 5V stabilized for Arduino and third 3.3V stabilized for MPU6050 and ESP8266. Conclusion - there is no problems with Batteries and power lines because robot freeze anyway. Robot work while it is horizontal. When I slowly rise it up, it show angle adjusted until motors start. Debug 1 show angle until start motor then robot freeze. Sometime motors run 10 - 20secons and respond to gyro angles, then freeze and show FIFO Reset. After several FIFO Reset prints (sometime 1, sometime 15+) serial stop too. With motor disconnected work fine and not freeze - serial monitor not show any errors. I cant understand how can motor connection influate Arduino board and freeze them with separate power lines and batteries. I have soldered 220uF capacitors on all power lines. Some 0.1uF capacitors on stepper driver power.
I checked fifoCount value after freezing - it is all time zero "0". Looks like Stepper motor block I2C or MPU.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)