|
|
@ -6,6 +6,7 @@ |
|
|
|
|
|
|
|
#include <Arduino.h> |
|
|
|
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) |
|
|
|
#define REPRAP_DISCOUNT_SMART_CONTROLLER |
|
|
|
#include "pins/pins_TRIGORILLA_14.h" |
|
|
|
#elif defined(__AVR_ATmega328P__) |
|
|
|
#define LED_PIN LED_BUILTIN |
|
|
@ -26,7 +27,24 @@ |
|
|
|
#define E1_ENABLE_PIN A4 |
|
|
|
#endif |
|
|
|
|
|
|
|
#define LCD_PINS_RS 16 |
|
|
|
#define LCD_PINS_ENABLE 17 |
|
|
|
#define LCD_PINS_D4 23 |
|
|
|
#define LCD_PINS_D5 25 |
|
|
|
#define LCD_PINS_D6 27 |
|
|
|
#define LCD_PINS_D7 29 |
|
|
|
|
|
|
|
#define BTN_EN1 31 |
|
|
|
#define BTN_EN2 33 |
|
|
|
#define BTN_ENC 35 |
|
|
|
|
|
|
|
#define BEEPER_PIN 37 |
|
|
|
#define KILL_PIN 41 |
|
|
|
#define SD_DETECT_PIN 49 |
|
|
|
|
|
|
|
#include "stepper.h" |
|
|
|
#include <Wire.h> |
|
|
|
#include <LiquidCrystal.h> |
|
|
|
|
|
|
|
const int NUM_STEPPER = 5; |
|
|
|
|
|
|
@ -36,6 +54,8 @@ TimerStepper stepper[NUM_STEPPER]; |
|
|
|
LoopStepper stepper[NUM_STEPPER]; |
|
|
|
#endif |
|
|
|
|
|
|
|
LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7); |
|
|
|
|
|
|
|
unsigned long lastMillis = 0; |
|
|
|
unsigned long lastCommand = 0; |
|
|
|
const long interval = 1000; // interval at which to blink (milliseconds)
|
|
|
@ -58,6 +78,9 @@ void setup() |
|
|
|
pinMode(TRIGORILLA_HEATER_0_PIN, OUTPUT); |
|
|
|
digitalWrite(TRIGORILLA_HEATER_0_PIN, HIGH); |
|
|
|
|
|
|
|
lcd.begin(20, 4); |
|
|
|
lcd.print("ROBERTO"); |
|
|
|
|
|
|
|
stepper[0].begin( X_DIR_PIN, X_STEP_PIN, X_ENABLE_PIN); |
|
|
|
stepper[1].begin( Y_DIR_PIN, Y_STEP_PIN, Y_ENABLE_PIN); |
|
|
|
stepper[2].begin( Z_DIR_PIN, Z_STEP_PIN, Z_ENABLE_PIN); |
|
|
|