Browse Source

new Pin numbers alfter pcb layouting

master
Flo Smilari 3 years ago
parent
commit
f91ac1602d
2 changed files with 12 additions and 10 deletions
  1. 11
    9
      Fraestisch_SFTools.ino
  2. 1
    1
      sloeber.ino.cpp

+ 11
- 9
Fraestisch_SFTools.ino View File

#define STEP 2 #define STEP 2
#define DIR 4 #define DIR 4
#define LIMIT_SWITCH 5 #define LIMIT_SWITCH 5
#define MOTOR_LED 15


static const byte led_gpio = 15;
static const int WLS_Pin = 14;
static const int WLS_DETECT_Pin = 12;


static const int WLS_Pin = 34;
static const int WLS_DETECT_Pin = 35;

static const int GreenBtn_Pin = 12;
static const int GreenBtn_Pin = 35;
static const int RedBtn_Pin = 13; static const int RedBtn_Pin = 13;
static const int BlueBtn_Pin = 14;
static const int BlueBtn_Pin = 34;


static const int RotEnc_Switch_Pin = 25;
static const int RotEnc_Clk_Pin = 32;
static const int RotEnc_Switch_Pin = 26;
static const int RotEnc_Clk_Pin = 25;
static const int RotEnc_Dta_Pin = 33; static const int RotEnc_Dta_Pin = 33;


static const int MOVE_DOWNWARD = -1; // motor rotation counter clock wise static const int MOVE_DOWNWARD = -1; // motor rotation counter clock wise
Display.init(); Display.init();
Display.display(); Display.display();


pinMode(led_gpio, OUTPUT);
pinMode(MOTOR_LED, OUTPUT);
pinMode(GreenBtn_Pin, INPUT); pinMode(GreenBtn_Pin, INPUT);
pinMode(RedBtn_Pin, INPUT); pinMode(RedBtn_Pin, INPUT);
pinMode(BlueBtn_Pin, INPUT); pinMode(BlueBtn_Pin, INPUT);
Display.setWlsConnected(WlsDetect.isConnected()); Display.setWlsConnected(WlsDetect.isConnected());
Display.showFrame(actualStatus); Display.showFrame(actualStatus);


digitalWrite(MOTOR_LED, LOW);

switch (actualStatus) { switch (actualStatus) {


case INITIALIZATION: case INITIALIZATION:


case MOVING_ELEVATOR: case MOVING_ELEVATOR:
//printStatus("MOVING_ELEVATOR"); //printStatus("MOVING_ELEVATOR");
digitalWrite(MOTOR_LED, HIGH);
if (Router_Elevator.isLimitSwitchTriggerd()) { if (Router_Elevator.isLimitSwitchTriggerd()) {
delay(200); delay(200);
SetActualStatus(RELEASE_SWITCH); SetActualStatus(RELEASE_SWITCH);

+ 1
- 1
sloeber.ino.cpp View File

//This is a automatic generated file //This is a automatic generated file
//Please do not modify this file //Please do not modify this file
//If you touch this file your change will be overwritten during the next build //If you touch this file your change will be overwritten during the next build
//This file has been generated on 2022-03-01 17:52:01
//This file has been generated on 2022-03-04 21:14:46


#include "Arduino.h" #include "Arduino.h"
#include <Arduino.h> #include <Arduino.h>

Loading…
Cancel
Save