[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 574: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 630: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
Build Your Own SLA/SLS • Arduino code. Suggestions wanted???
Page 1 of 1

Arduino code. Suggestions wanted???

Posted: Wed Jul 15, 2015 11:33 pm
by wirelessguyny

Re: Arduino code. Suggestions wanted???

Posted: Thu Jul 16, 2015 2:55 am
by Fridolin
I suggest you use a library
It made things way easier for me.

Re: Arduino code. Suggestions wanted???

Posted: Thu Jul 16, 2015 2:13 pm
by wirelessguyny
Thanks for the link. I have downloaded the code and some of the examples but I'm really not skilled on the programming front. (I'm OK reading what others have done but my programming is as basic as can be).

I've gone ahead and posted to the google forum for that group to see if anyone has any suggestions for me in coming up with some simple code to drive the motor in one direction for a given interval and then just stop. So far everything I've seen seems to loop and the best I can do is have he motor spin in one direction and then return to its original location, so I don't hit in to an end.

Any recommendations are still welcome.

Thanks.

Re: Arduino code. Suggestions wanted???

Posted: Thu Jul 16, 2015 2:34 pm
by Fridolin
Just for clarity.
You want the motor to move into one direction, then stop, wait some time and then move again in the same direction and you want it to stop so it doesn't reach the end?

Re: Arduino code. Suggestions wanted???

Posted: Thu Jul 16, 2015 3:24 pm
by wirelessguyny
Actually, even simpler.

At first I just want to be able to control it in one direction. (e.g. take 5 paces up then Stop. I'll run that again and again manually- probably start at a higher number and get smaller as I get close to the end).

Once I'm at the far end I'd work to figure out how many paces until the other end. At that point I'd be able to load in code that gets it to sweep all the way from one side to another. (Hopefully that will give me enough info to know what I'd need to load in to Creation Workshop to give it the out limits of travel.

Does that make sense?

Re: Arduino code. Suggestions wanted???

Posted: Sat Jul 18, 2015 9:17 am
by Fridolin

Re: Arduino code. Suggestions wanted???

Posted: Sat Jul 18, 2015 11:02 pm
by wirelessguyny
This sort of works.

I needed to change your (digitalRead(buttonPin) == HIGH) to say LOW for some reason.

It will move the stepper forward for 5 paces and then stop 'temporarily' but it starts up again. The movement itself doesn't seem quite fluid either.

Re: Arduino code. Suggestions wanted???

Posted: Sun Jul 19, 2015 2:34 am
by Fridolin
Can you draw a little scematic of how you connected the button to your arduino board?

The movement isn't fluid because this library uses acceleration. Basicly your stepper starts with a slow speed and accelerates to its maximum speed.
You can change both maximum speed and acceleration to suit your needs.

Re: Arduino code. Suggestions wanted???

Posted: Sun Jul 19, 2015 8:47 pm
by wirelessguyny
I've gone and shifted everything from pins 4,5,6 to 5,6,7 to better match some of the code I will end up using in production.

I have a 12V @ 1.5A line going to =/- for the Stepper itself (with 100uF decoupling cap) Stepper is on A1,A2,B1,B2 as usual
M0, M1, M2 all go to 5V on the Arduino board (high/high/high - i.e. 1/32 step)
Enable - 7
Step - 6
Dir - 5

(The production code I refer to is what HTL here came up with to interface his Arduino Uno with Creation Workshop with a few User Defined variables. I've yet to try that code because I don't have any limit switches and wanted to gauge my total working distance before messing with more complex code. You can find HTL's code and background info here: ).

I don't know what a full revolution is for my stepper and I guesstimate that the total working distance I have from end to end is 44.75mm (so roughly 45mm )