waspinator / AccelStepper

Fork of AccelStepper
http://www.airspayce.com/mikem/arduino/AccelStepper/
Other
146 stars 85 forks source link

Incompatible with Uno R4 Minima and WIFI #27

Open MrYsLab opened 1 year ago

MrYsLab commented 1 year ago

I tested the following sketch using a TB6600 on the Arduino UNO R3, R4 Minima, and R4 WIFI. The R3 works perfectly, but the R4 boards do not. The motor attempts to turn but simply stutters. If I instantiate a WiFiServer in the sketch for the R4 WIFI, the motor still stutters, but it does so at a much slower rate than when the WiFIServer is not instantiated.

// Bounce.pde
// -*- mode: C++ -*-
//
// Make a single stepper bounce from one limit to another
//
// Copyright (C) 2012 Mike McCauley
// $Id: Random.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $

#include <AccelStepper.h>
#define dirPin 9
#define stepPin 8
#define motorInterfaceType 1

// Create a new instance of the AccelStepper class:
AccelStepper stepper = AccelStepper(motorInterfaceType, stepPin, dirPin);

void setup()
{  
  // Change these to suit your stepper if you want
  stepper.setMaxSpeed(900);
  stepper.setAcceleration(500);
  stepper.moveTo(1500);
}

void loop()
{
    // If at the end of travel go to the other end
    if (stepper.distanceToGo() == 0)
      stepper.moveTo(-stepper.currentPosition());

    stepper.run();
}
rxelizondo commented 1 year ago

I offer no fix for this but just wanted to voice out that I too have similar issues with the AccelStepper running under Arduino R4 Wifi.. In my case, I have a program that runs perfectly fine under Arduino R3 but acts erratically when the exact same program runs under the new Arduino R4 Wifi. In my case, I am using DM542T drivers to control the steppers motors.

rvanderwerf commented 9 months ago

+1 same here. It makes weird noises and control is erratic!