Go Down

Topic: Timelapse controller - accelStepper (Read 1 time) previous topic - next topic

michaelb01

Hello,

i'm building a timelapse controller (consisting of 2 buttons, 2 potentiometers and an LCD). I'm planning to use the accelStepper since it looks like a great library for my needs.

Originally, I had been using the standard stepper library (that comes with the IDE) with the following code:

Code: [Select]
    if (millis() >= waitStep) {
      myStepper.step(1);     
      lcd.setCursor(7,1);
      lcd.print(stepCount);
      stepCount++;
      waitStep = millis() + stepDelay;
    }     


However, if i'm using the accelStepper library is it possible to modify the library to include the lcd instructions (set cursor and print), so that I could just have
Code: [Select]
  myStepper.runSpeed(); within my startTimelapse() function.

If i insert this code into the accelStepper.cpp, do I need to also include the LCD library in that file, or in the header file (or both?)

Thanks in advance,

Michael

Go Up