Giter VIP home page Giter VIP logo

easy_driver's Issues

errors w/ FULL2WIRE ?

Hello there im just inquiring about a error that im getting from a example 7 found in
http://www.schmalzhaus.com/EasyDriver/Examples/EasyDriverExamples.html

im not sure but this is the error im getting:

sketch_feb10b:21: error: 'FULL2WIRE' is not a member of 'AccelStepper'
AccelStepper stepper(AccelStepper::FULL2WIRE, 8, 9);
^
exit status 1
'FULL2WIRE' is not a member of 'AccelStepper'

i assume it must be a BigEasy fix.

also here is the original example for further clarification:

/*
Example 7: Serial command input

Using the exact same hardware setup as Example
1, this sketch illustrates how to use simple
one letter commands from the serial port to
control the direction and speed of the stepper
motor.

Example7 for Brian Schmalz's Easy Driver
We control the direction and speed of a
stepper using the
arduino serial port. Note that (if using
the Serial Monitor)
you will need to press Enter after each
command.
*/
#include <AccelStepper.h>

AccelStepper stepper(AccelStepper::FULL2WIRE, 8, 9);

int spd = 1000; // The current speed in steps/second
int sign = 1; // Either 1, 0 or -1

void setup()
{
Serial.begin(9600);
stepper.setMaxSpeed(1000);
stepper.setSpeed(1000);
}

void loop()
{
char c;
if (Serial.available()) {
c = Serial.read();
if (c == 'f') { // forward
sign = 1;
}
if (c == 'r') { // reverse
sign = -1;
}
if (c == 's') { // stop
sign = 0;
}
if (c == '1') { // super slow
spd = 10;
}
if (c == '2') { // medium
spd = 100;
}
if (c == '3') { // fast
spd = 1000;
}
stepper.setSpeed(sign * spd);
}
stepper.runSpeed();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.