E.g.
Code:
void motorSpin()
{
motorLeft = motorDirection;
motorRight = !motorDirection;
}
void directionToggle()
{
motorDirection = !motorDirection;
}
{
motorLeft = motorDirection;
motorRight = !motorDirection;
}
void directionToggle()
{
motorDirection = !motorDirection;
}
Note: Completely untested and assuming a few things. (I dont have a Arduino yet)
Tricks like this however are very efficent.


