-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
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();
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels