// includes ----------------------------
#include <LiquidCrystal.h>
// defines -----------------------------
LiquidCrystal lcd(13, 12, 9, 8, 7, 6);
const int btnStart = 20;
int btnStart_oldValue = LOW;
const int btnReset = 21;
int btnReset_oldValue = LOW;
const int stepDir = 27;
const int stepStep = 28;
int stepOldStep = LOW;
// functions ---------------------------
void setup() {
// Define LCD (16x2)
lcd.begin(16, 2);
//template"----------------"
lcd.print(" - PyDiLaMa -");
lcd.setCursor(0,1);
lcd.print("2nd line");
// Initialize the pin for reading the button.
pinMode(btnStart, INPUT);
pinMode(btnReset, INPUT);
pinMode(stepDir, OUTPUT);
pinMode(stepStep, OUTPUT);
}
void loop() {
if (digitalRead(btnStart) == HIGH) {
lcd.print("R");
digitalWrite(stepDir, LOW);
digitalWrite(stepStep, HIGH);
}
else {
digitalWrite(stepStep, LOW);
}
}
void stepPos() {
}
void stepNeg() {
}
void setAngle() {
}start
reset