<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[SoliForum - 3D Printing Community — Using the Azteeg X3 for something other than printing.]]></title>
		<link>https://www.soliforum.com/topic/6471/using-the-azteeg-x3-for-something-other-than-printing/</link>
		<atom:link href="https://www.soliforum.com/feed/rss/topic/6471/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Using the Azteeg X3 for something other than printing..]]></description>
		<lastBuildDate>Tue, 20 May 2014 20:13:27 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Using the Azteeg X3 for something other than printing.]]></title>
			<link>https://www.soliforum.com/post/56680/#p56680</link>
			<description><![CDATA[<p>Hello, I&#039;m not sure if this is the best place to post this, but I&#039;m doing so anyway <img src="https://www.soliforum.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" />! I have an Azteeg X3 that I am using to control some stepper motors on a door lock, but for the life of me, I cannot figure out how to code the stepper motor drivers properly. I might not have the right pins or something. Currently, I have a single stepper motor hooked up to the X-Axis and I have a desktop PSU properly supplying power to the board. Anyway, here is the code I am trying:<br /></p><div class="codebox"><pre><code>// testing a stepper motor with a Pololu A4988 driver board or equivalent
// on an Uno the onboard led will flash with each step
// as posted on Arduino Forum at link

byte directionPin = 28;
byte stepPin = 26;
byte enable = 24;
int numberOfSteps = 100;
byte ledPin = 6;
int pulseWidthMicros = 20;  // microseconds
int millisbetweenSteps = 25; // milliseconds


void setup() 
{ 

  Serial.begin(9600);
  Serial.println(&quot;Starting StepperTest&quot;);
  digitalWrite(ledPin, LOW);
  
  delay(2000);

  pinMode(directionPin, OUTPUT);
  pinMode(stepPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
   pinMode(enable, OUTPUT);
  
  digitalWrite(directionPin, HIGH);
  digitalWrite(enable, HIGH);
  for(int n = 0; n &lt; numberOfSteps; n++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidthMicros);
    digitalWrite(stepPin, LOW);
    
    delay(millisbetweenSteps);
    
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
  
  delay(3000);
  

  digitalWrite(directionPin, LOW);
  for(int n = 0; n &lt; numberOfSteps; n++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidthMicros);
    digitalWrite(stepPin, LOW);
    
    delay(millisbetweenSteps);
    
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
  
}

void loop() 
{ 

}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (128keaton)]]></author>
			<pubDate>Tue, 20 May 2014 20:13:27 +0000</pubDate>
			<guid>https://www.soliforum.com/post/56680/#p56680</guid>
		</item>
	</channel>
</rss>
