Ranger nested loop problem (bug)


#1

image

The above image as en example, the ranger is supposed to move around as a growing radius circle, yet instead, the ranger waits until the spider count to be greater than 50 then moves as both motor 50% power.

I found out the ranger programs having trouble with motor actions inside nested loops. Is that a compiler or firmware problem?

I tried and found out that a nested loop with any motor action inside results high risk of no motor movement performed.

ps: removing the forever loop does NOT help anything.

Thanks
-Chi


#2

One thing I’ll mention is that the motors may not move the robot until they are at least 50%-60% powered due to the nature of how the motors work. They are controlled by pulse width modulation and anything under 50 is simply not enough pulses to make it go. Try starting with higher numbers and see if that fixes it. Also, .005 is comparatively speaking microscopic for PWM so I might suggest using a whole number instead.


#3

I increased the right power, spider, as 50% to 80%, yet the system still dose not function correctly.
Still waits the spider counting to 80, then left motor drive as 100% and 80% for the right one.


#4

Can you try the same program in mBlock 3.x? mBlock 5 is still in beta and may not be doing the right things yet. Also, which configuration of the mBot Ranger are you using?


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.