This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define X_STEP_PIN 54 | |
#define X_ENABLE_PIN 38 | |
#define ANALOG_PIN 4 | |
void setup(){ | |
pinMode(X_STEP_PIN, OUTPUT); | |
pinMode(X_ENABLE_PIN, OUTPUT); | |
TCCR0A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20); // non-Inverting PWM, | |
OCR0A = 255; |
NewerOlder