Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: the move comands crash the arduino
dZoid
Newbie
Posts: 17
Permalink
Post the move comands crash the arduino
on: August 3, 2012, 00:06
Quote

Ola,

Here i am :

My arduino respond to the "home command" but won't do anything from there so i try sending commands by hand through the arduino serial console.

When i start the arduino or push the reset button i get this :

POLARGRAPH ON!
Loaded machine width:650
Loaded machine height:650
Loaded mm per rev:65535.00
Loaded motor steps per rev:400
Recalculated pageWidth in steps (43789)
Recalculated pageHeight in steps (43789)
Loaded machine name:ÿÿÿÿÿÿÿÿ
Recalculated mmPerStep (20.48) and stepsPerMM (0.05)
READY

followed by a regular READY message every ten secs or something...

The Loaded machine name is strange, but i guess it's not a big deal...

So i try issuing commands :

If i send anything like :

> blahblah

i get :

< Command not parsed.

So i think i can comunicate 🙂

Trying something more meaningfull now :

> C32,400.0,END

i get :

< New acceleration: 400.00

Which is fabulous 🙂

> C31,600.0,END
< New max speed: 600.00

> C02,0.8,END
< Changed Pen width to 0.80mm

> C09,2233,3169,END ( set HOME )
< SYNC,2233,3169,END
< MEMORY,468,END

and the motors are blocked
that's fabulous 🙂

BUT WHEN :
> C01,3846,4181,END (move PEN to POINT with a low random point)

Nothing came back, and the motors don't do anything ( not relaxing or moving ) and i get "READY" message anymore...

So my guess is that the arduino has just crashed 🙁
But i have no idea what to do now ...

dZoid
Newbie
Posts: 17
Permalink
Post Re: the move comands crash the arduino
on: August 3, 2012, 00:09
Quote

also :

If C01,3846,4181,END is the first message a send i get the same result ( meaning : nothing and crash )

dZoid
Newbie
Posts: 17
Permalink
Post Re: the move comands crash the arduino
on: August 3, 2012, 00:20
Quote

next step trying SET PEN POSITION ( C09 ) after reseting

> C09,3551,3108,END
< SYNC,3551,3108,END
< MEMORY,468,END

It doesn't crash and he replied.
But the motors doesn't work either instead, both of them does a very small back and forth, like one (micro?)step.

If i try with another location say :
> C09,2551,3308,END
< SYNC,2551,3308,END
and the same little back and forth...

any though is welcome 🙂

dZoid
Newbie
Posts: 17
Permalink
Post Re: the move comands crash the arduino
on: August 3, 2012, 00:38
Quote

slowing down the speed and accelleration show up that the little back and forth is not one step in each direction but rather five to ten tiny steps in both direction, and not synchronous between the two motors.

also, when i upload the sample code from adafruit, my motors goes just well ...

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: the move comands crash the arduino
on: August 3, 2012, 15:06
Quote

Ok, I fixed that problem, and have updated the repo with the new version. It was to do with the variable "currentlyRunning" which is the boolean that allows us to pause and run when we have hardware buttons - it basically is set to false by default, so when you did a C01, it went into the "move motors" loop that could only be exited by finishing the move.. But because currentlyRunning was false, it was prevented from doing the move to get it there! Oops, well, that's why I haven't made it the main release yet 🙂

Actually this problem has been throwing up by my attempts to try and merge the code base for the regular polargraph with the polagraphSD. There may well be a few more gotchas like that, but hopefully none quite as fundamental!

Oh, and the C09 operation - it does a little wriggle, four steps on both motors just to lock them - that's normal.

Thanks for being patient.
sn

dZoid
Newbie
Posts: 17
Permalink
Post Re: the move comands crash the arduino
on: September 4, 2012, 15:54
Quote

thanks for the update 🙂

It works like a charm now !

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.02 seconds.