Oh man... I was wrong to begin with, the motor hiccup is because of the keyboard code, I presume the buffer.
I need to investigate what parts of the code I don't need to smooth out the button...
Type: Posts; User: NightHawk
Oh man... I was wrong to begin with, the motor hiccup is because of the keyboard code, I presume the buffer.
I need to investigate what parts of the code I don't need to smooth out the button...
pinMode defines a pin as input or output, digitalWrite sets the pin high or low. Sorry if I left that out. I just wanted to get the setup right before I tried the control. But this get's me alot...
These arrays are surprisingly confusing once you get into it :P
How does this look?
int motor1[4] = { 3, 4, 5, 6 };
int count1 = 0;
int motor2[4] = { 14, 15, 16, 17 };
int count2 = 0;
That makes sense. I'm writing to individual bits. My thinking power has run out for today, I'm gonna pick it up tomorrow.
Thanks alot :)
I'm a bit fuzzy on how to translate the binary sequence to pin order inside the array. Since I have two stepper motors, should I make two pin arrays or can I have both motors in one array?
Getting rid of the
if( buf[ i ] != old_buf[ i ] ) {
for( j = 0; j < 8; j++ ) {
...
}
...
The sequence in the code is 1100 0110 0011 1001, it works on my steppers with the wires plugged in a straight row, if that's what you mean. Thanks for the input guys, I'll study this and see if I can...
This is a school project so I'm writing description in my own language, sorry about that. The keyboard code itself is modified from Circuits@home. I've only gone in circles with the digitalWrites,...
I'm building a project with Arduino duemilanove and sparkfun usb host shield. I'm basicly driving two stepper motors with a wireless keyboard. I've got the code working except for one thing, it seems...