PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 satır
522B

  1. // ConstantSpeed.pde
  2. // -*- mode: C++ -*-
  3. //
  4. // Shows how to run AccelStepper in the simplest,
  5. // fixed speed mode with no accelerations
  6. /// \author Mike McCauley (mikem@airspayce.com)
  7. // Copyright (C) 2009 Mike McCauley
  8. // $Id: ConstantSpeed.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $
  9. #include <AccelStepper.h>
  10. AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5
  11. void setup()
  12. {
  13. stepper.setMaxSpeed(1000);
  14. stepper.setSpeed(50);
  15. }
  16. void loop()
  17. {
  18. stepper.runSpeed();
  19. }