Jump to content

Atom74

Members
  • Content count

    3
  • Joined

  • Last visited

  1. Atom74

    Library stepper.h

    Hey guys, I´m using a stepper motor in half step mode. In half step my motor has 400 steps. I wanna make it move one step at time with short pauses between each movement (2,5s). Also, after it completes the 400 steps it should start moving on the opposite direction. I´m using the library stepper.h but I´m having some doubts about it, this is my code at the moment: #include <Stepper.h> int x = 1; // step int z = 0; int w = -1; const int stepsPerRevolution = 400; // number of steps in half step mode Stepper myStepper(stepsPerRevolution, 8,9,10,11); void setup() { myStepper.setSpeed(60); // 60 rpm } void loop() { myStepper.step(x); delay(2500); // pause between each step 2,5s x++; if(x==stepsPerRevolution) z=1; // when 400 steps then move in the opposite direction while(z){ myStepper.step(-w); delay(2500); w--; if(w==-stepsPerRevolution) z=0 && x=1; } } } I don´t know if it is configure correctly. Should I use stepsPerRevolution = 200 (number of steps in full step mode) with x increasing in 0.5 by time? Also, can I use myStepper.step that way? Thank you!
  2. Atom74

    Error during download

    Solved it changing the proxy configs. Working normally now, thanks!
  3. Hey guys, I´m using TM4C123G but I can´t configure Energia. When I go in board management and try downloading Energai TivaC Boards it fails and an error messaging appears saying "error during download..." Anyone knows how can I sovle it? Regards!
×