Skip to content

Commit

Permalink
add AccelStepperFirmata to all ConfigurableFirmata examples
Browse files Browse the repository at this point in the history
  • Loading branch information
soundanalogous committed Sep 16, 2017
1 parent 4c0c4a1 commit 3074683
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
6 changes: 4 additions & 2 deletions examples/ConfigurableFirmata/ConfigurableFirmata.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright (C) 2009 Shigeru Kobayashi. All rights reserved.
Copyright (C) 2013 Norbert Truchsess. All rights reserved.
Copyright (C) 2014 Nicolas Panel. All rights reserved.
Copyright (C) 2009-2016 Jeff Hoefs. All rights reserved.
Copyright (C) 2009-2017 Jeff Hoefs. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand All @@ -22,7 +22,7 @@
See file LICENSE.txt for further informations on licensing terms.
Last updated by Jeff Hoefs: January 23rd, 2016
Last updated: September 16th, 2017
*/

/*
Expand Down Expand Up @@ -175,6 +175,8 @@ I2CFirmata i2c;
#include <OneWireFirmata.h>
OneWireFirmata oneWire;

// StepperFirmata is deprecated as of ConfigurableFirmata v2.10.0. Please update your
// client implementation to use the new, more full featured and scalable AccelStepperFirmata.
#include <StepperFirmata.h>
StepperFirmata stepper;

Expand Down
13 changes: 12 additions & 1 deletion examples/ConfigurableFirmataBLE/ConfigurableFirmataBLE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
See file LICENSE.txt for further informations on licensing terms.
Last updated January 29th, 2017
Last updated September 16th, 2017
*/

/*
Expand Down Expand Up @@ -168,9 +168,14 @@ I2CFirmata i2c;
#include <OneWireFirmata.h>
OneWireFirmata oneWire;

// StepperFirmata is deprecated as of ConfigurableFirmata v2.10.0. Please update your
// client implementation to use the new, more full featured and scalable AccelStepperFirmata.
#include <StepperFirmata.h>
StepperFirmata stepper;

#include <AccelStepperFirmata.h>
AccelStepperFirmata accelStepper;

#include <SerialFirmata.h>
SerialFirmata serial;

Expand Down Expand Up @@ -286,6 +291,9 @@ void initFirmata()
#ifdef StepperFirmata_h
firmataExt.addFeature(stepper);
#endif
#ifdef AccelStepperFirmata_h
firmataExt.addFeature(accelStepper);
#endif
#ifdef SerialFirmata_h
firmataExt.addFeature(serial);
#endif
Expand Down Expand Up @@ -364,6 +372,9 @@ runtasks: scheduler.runTasks();
#ifdef StepperFirmata_h
stepper.update();
#endif
#ifdef AccelStepperFirmata_h
accelStepper.update();
#endif
#ifdef SerialFirmata_h
serial.update();
#endif
Expand Down
15 changes: 13 additions & 2 deletions examples/ConfigurableFirmataWiFi/ConfigurableFirmataWiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Copyright (C) 2013 Norbert Truchsess. All rights reserved.
Copyright (C) 2014 Nicolas Panel. All rights reserved.
Copyright (C) 2015-2016 Jesse Frush. All rights reserved.
Copyright (C) 2009-2016 Jeff Hoefs. All rights reserved.
Copyright (C) 2009-2017 Jeff Hoefs. All rights reserved.
Copyright (C) 2016 Jens B. All rights reserved.
This library is free software; you can redistribute it and/or
Expand All @@ -24,7 +24,7 @@
See file LICENSE.txt for further informations on licensing terms.
Last updated by Jeff Hoefs: August 14th, 2016
Last updated: September 16th, 2017
*/

/*
Expand Down Expand Up @@ -357,9 +357,14 @@ I2CFirmata i2c;
#include <OneWireFirmata.h>
OneWireFirmata oneWire;

// StepperFirmata is deprecated as of ConfigurableFirmata v2.10.0. Please update your
// client implementation to use the new, more full featured and scalable AccelStepperFirmata.
#include <StepperFirmata.h>
StepperFirmata stepper;

#include <AccelStepperFirmata.h>
AccelStepperFirmata accelStepper;

#include <SerialFirmata.h>
SerialFirmata serial;

Expand Down Expand Up @@ -587,6 +592,9 @@ void initFirmata()
#ifdef StepperFirmata_h
firmataExt.addFeature(stepper);
#endif
#ifdef AccelStepperFirmata_h
firmataExt.addFeature(accelStepper);
#endif
#ifdef SerialFirmata_h
firmataExt.addFeature(serial);
#endif
Expand Down Expand Up @@ -670,6 +678,9 @@ runtasks: scheduler.runTasks();
#ifdef StepperFirmata_h
stepper.update();
#endif
#ifdef AccelStepperFirmata_h
accelStepper.update();
#endif
#ifdef SerialFirmata_h
serial.update();
#endif
Expand Down

0 comments on commit 3074683

Please sign in to comment.