Converted to platformio
This commit is contained in:
71
include/EggDuino.h
Normal file
71
include/EggDuino.h
Normal file
@@ -0,0 +1,71 @@
|
||||
#ifndef EGGDUINO_H
|
||||
#define EGGDUINO_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Servo.h>
|
||||
#include <avr/eeprom.h>
|
||||
|
||||
#include "AccelStepper.h"
|
||||
#include "SerialCommand.h"
|
||||
#include "button.h"
|
||||
|
||||
// implemented Eggbot-Protocol-Version v13
|
||||
#define initSting "EBBv13_and_above Protocol emulated by Eggduino-Firmware V1.6a"
|
||||
|
||||
// Rotational Stepper
|
||||
#define step1 11
|
||||
#define dir1 10
|
||||
#define enableRotMotor 9
|
||||
#define rotMicrostep 16
|
||||
|
||||
// Pen Stepper
|
||||
#define step2 8
|
||||
#define dir2 7
|
||||
#define enablePenMotor 6
|
||||
#define penMicrostep 16
|
||||
|
||||
#define servoPin 3
|
||||
|
||||
#define penUpPosEEAddress ((uint16_t *)0)
|
||||
#define penDownPosEEAddress ((uint16_t *)2)
|
||||
|
||||
extern AccelStepper rotMotor;
|
||||
extern AccelStepper penMotor;
|
||||
extern Servo penServo;
|
||||
extern SerialCommand SCmd;
|
||||
|
||||
extern int penMin;
|
||||
extern int penMax;
|
||||
extern int penUpPos;
|
||||
extern int penDownPos;
|
||||
extern int servoRateUp;
|
||||
extern int servoRateDown;
|
||||
extern long rotStepError;
|
||||
extern long penStepError;
|
||||
extern int penState;
|
||||
extern uint32_t nodeCount;
|
||||
extern unsigned int layer;
|
||||
extern boolean prgButtonState;
|
||||
extern uint8_t rotStepCorrection;
|
||||
extern uint8_t penStepCorrection;
|
||||
extern float rotSpeed;
|
||||
extern float penSpeed;
|
||||
extern boolean motorsEnabled;
|
||||
|
||||
void makeComInterface();
|
||||
void initHardware();
|
||||
void moveOneStep();
|
||||
void moveToDestination();
|
||||
void sendAck();
|
||||
void sendError();
|
||||
void motorsOff();
|
||||
void motorsOn();
|
||||
void toggleMotors();
|
||||
void doTogglePen();
|
||||
void setprgButtonState();
|
||||
bool parseSMArgs(uint16_t *duration, int *penStepsEBB, int *rotStepsEBB);
|
||||
void prepareMove(uint16_t duration, int penStepsEBB, int rotStepsEBB);
|
||||
void storePenUpPosInEE();
|
||||
void storePenDownPosInEE();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user