<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ATOMIC Stepmotor Base (DRV8825) Example Doesn&#x27;t Work...]]></title><description><![CDATA[<p dir="auto">I'm using the stepper base with an AtomS3 Lite and the example code linked from the docs doesn't work...<br />
<a href="https://github.com/m5stack/M5-ProductExampleCodes/tree/master/AtomBase/Atomic_StepMotor/Atomic_StepMotor" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5-ProductExampleCodes/tree/master/AtomBase/Atomic_StepMotor/Atomic_StepMotor</a><br />
Is my module defective?</p>
<p dir="auto">It says the repository has been archived, are they discontinuing this module?</p>
<p dir="auto">I tried the code stock with the correct pins set and also stripped it down to this, but the driver doesn't even appear to send power to the motor...<br />
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv</p>
<p dir="auto">#include "StepperDriver.h"</p>
<p dir="auto">int step_per_rev = 200;<br />
int microstep = 1;<br />
int pin_en = 5;<br />
int pin_direction = 7;<br />
int pin_step = 6;</p>
<p dir="auto">StepperDriver ss(step_per_rev, microstep, pin_en, pin_direction, pin_step);</p>
<p dir="auto">void setup() {<br />
ss.setSpeed(100);<br />
ss.powerEnable(true);<br />
delay(1600);<br />
}</p>
<p dir="auto">void loop() {<br />
ss.step(5000);<br />
ss.step(-5000);<br />
}</p>
]]></description><link>https://community.m5stack.com/topic/6393/atomic-stepmotor-base-drv8825-example-doesn-t-work</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 15:45:48 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6393.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 Apr 2024 15:40:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ATOMIC Stepmotor Base (DRV8825) Example Doesn&#x27;t Work... on Sun, 28 Apr 2024 21:05:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cairnus" aria-label="Profile: cairnus">@<bdi>cairnus</bdi></a> how to mark text as code:<br />
Start a blank line with three back-quotes ` (upper left of the keyboard, below the tilde)</p>
<pre><code>#include &lt;AccelStepper.h&gt;

int pin_en = 5;
int pin_direction = 7;
int pin_step = 6;
int pin_reset = 39;
int pin_voltage = 8;
int pin_fault = 38;
int microstep = 1;
</code></pre>
<p dir="auto">end with a blank line and three back-quotes as well.<br />
cheers!</p>
]]></description><link>https://community.m5stack.com/post/24980</link><guid isPermaLink="true">https://community.m5stack.com/post/24980</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Sun, 28 Apr 2024 21:05:30 GMT</pubDate></item><item><title><![CDATA[Reply to ATOMIC Stepmotor Base (DRV8825) Example Doesn&#x27;t Work... on Mon, 29 Apr 2024 14:43:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jaxsuks" aria-label="Profile: jaxsuks">@<bdi>jaxsuks</bdi></a> I had issues with their library as well, I switched to AccelStepper and had to figure out why mine didn't work either, turned out to be the reset pin needed to be pulled high.<br />
<s>Hm, can't figure out how to mark text as code...</s> so here it is...</p>
<pre><code>#include &lt;AccelStepper.h&gt;

int pin_en = 5;
int pin_direction = 7;
int pin_step = 6;
int pin_reset = 39;
int pin_voltage = 8;
int pin_fault = 38;
int microstep = 1;

AccelStepper stepper(AccelStepper::DRIVER, pin_step, pin_direction, true);

float stepperGetVoltage() {
    int input = analogRead(pin_voltage);
    float voltage_divider = 5.999; // 7.5k &amp; 1.5k
    float voltage_adc_max = 3.3;
    float voltage = voltage_divider * voltage_adc_max * (float(input) / 4095);
    return voltage;
}

bool stepperHasFault() {
    return digitalRead(pin_fault);
}

void stepperReset() {
    digitalWrite(pin_reset, LOW);
    delay(100);
    digitalWrite(pin_reset, HIGH);
}

void stepperSetup() {
    pinMode(pin_voltage, INPUT);
    pinMode(pin_fault, INPUT);
    pinMode(pin_reset, OUTPUT);
    digitalWrite(pin_reset, HIGH);
    stepper.setEnablePin(pin_en);
    stepper.setPinsInverted(false, false, true);
}

void setup() {
    stepperSetup();
    stepper.enableOutputs();
    stepper.setMaxSpeed(200);
    int steps = 800;
    steps = steps * microstep;
    stepper.moveTo(800);
}

void loop() {
    // Pin Pong with 4 Revolutions
    if (stepper.distanceToGo() == 0) {
        stepper.moveTo(-stepper.currentPosition());
    }
    stepper.run();
}
</code></pre>
]]></description><link>https://community.m5stack.com/post/24979</link><guid isPermaLink="true">https://community.m5stack.com/post/24979</guid><dc:creator><![CDATA[Cairnus]]></dc:creator><pubDate>Mon, 29 Apr 2024 14:43:14 GMT</pubDate></item></channel></rss>