Open krikz opened 8 years ago
It's ready in fork https://github.com/elhernes/EggDuino
I had the same question and was happy to see this issue come up. That fork seems to be missing "functions.h" that's critical to compiling it.
@krikz, @twstdpear did you found the functions.h file somewhere?
I commented out the line #include "functions.h" so it looks like //#include "functions.h" and it now compiles without any errors. I don't have the motorshield yet though so I can't try it. Can someone give it a try and let me know?
@mnelson78 ok, it send and receive stuff, but with the motor shield my stepper motors acting funny. Im going to re-check my step per revolutions etc. They make a lot of noise, and almost don't turn
@mnelson78 its finally printing. the resolution is crap, but it works.
Check out my first test print on a plastic egg. Motors still make a lot of noise, i see that it is microstep related. if i switch to interleave the pen goes way to fast. Also still shocky >> https://www.youtube.com/watch?v=RYX1ItsFG3s
If you're using the original V1 motorshield from Adafruit you probably won't have much luck with microstepping. To get microstepping to work for the L293D drivers requires adding external DAC chips and various supporting circuitry.
I have a similar shield (the Osepp motor shield) and it really only works when you do single stepping.
Hi, I try use adafruit motor shield for eggduino, make some changes like this:
// two stepper motors one on each port
AF_Stepper rotAFMotor(200, rotMotorNumber);
AF_Stepper penAFMotor(200, penMotorNumber);
`
// you can change these to DOUBLE or INTERLEAVE or MICROSTEP!but it move motor in one direction I remove abs in lines like that:
rotMotor.setSpeed( abs( (float)rotStepsEBB * (float)1000 / (float)duration ) );
and change motorsOn and motorsOff functions
void motorsOff() {
rotAFMotor.release();
penAFMotor.release();
//digitalWrite(enableRotMotor, HIGH);
//digitalWrite(enablePenMotor, HIGH);
motorsEnabled = 0;
}
`
void motorsOn() {But it not work correctly, I looking to AccelStepper, how it work and I think motor rotation need deeply change for adafruit motor shield because pin mode and func mod is very different
// 0 pin step function (ie for functional usage)
void AccelStepper::step0(long step)
{
if (_speed > 0)
_forward();
else
_backward();
}
in this case _speed >0 allways true (need remove abs)// 1 pin step function (ie for stepper drivers)
// This is passed the current step number (0 to 7)
// Subclasses can override
void AccelStepper::step1(long step)
{
// _pin[0] is step, _pin[1] is direction
setOutputPins(_direction ? 0b10 : 0b00); // Set direction first else get rogue pulses
setOutputPins(_direction ? 0b11 : 0b01); // step HIGH
// Caution 200ns setup time
// Delay the minimum allowed pulse width
delayMicroseconds(_minPulseWidth);
setOutputPins(_direction ? 0b10 : 0b00); // step LOW
`
}`So, do you have any ideas?