2014-05-05 12:50:13 -06:00
|
|
|
// Only modify this file to include
|
|
|
|
// - function definitions (prototypes)
|
|
|
|
// - include files
|
|
|
|
// - extern variable definitions
|
|
|
|
// In the appropriate section
|
|
|
|
|
|
|
|
#ifndef _farmbot_arduino_controller_H_
|
|
|
|
#define _farmbot_arduino_controller_H_
|
|
|
|
#include "Arduino.h"
|
2019-12-02 14:07:28 -07:00
|
|
|
//#include "Arduino.h"
|
|
|
|
|
2014-05-05 12:50:13 -06:00
|
|
|
//add your includes for the project farmbot_arduino_controller here
|
2019-12-02 14:07:28 -07:00
|
|
|
#include "Board.h";
|
|
|
|
#include "pins.h"
|
|
|
|
#include "Config.h"
|
|
|
|
#include "MemoryFree.h"
|
|
|
|
#include "Debug.h"
|
|
|
|
|
2020-02-11 13:32:04 -07:00
|
|
|
#if defined(FARMDUINO_EXP_V20) || defined(FARMDUINO_V30)
|
2020-01-22 14:06:01 -07:00
|
|
|
#include "TMC2130.h"
|
|
|
|
#endif
|
2019-12-02 14:07:28 -07:00
|
|
|
|
|
|
|
#include "Movement.h"
|
|
|
|
#include "ServoControl.h"
|
|
|
|
#include "PinGuard.h"
|
|
|
|
#include "CurrentState.h"
|
|
|
|
#include <SPI.h>
|
2014-05-05 12:50:13 -06:00
|
|
|
#include "Command.h"
|
2014-05-15 11:44:28 -06:00
|
|
|
#include "GCodeProcessor.h"
|
2014-05-05 12:50:13 -06:00
|
|
|
|
2019-12-02 14:07:28 -07:00
|
|
|
|
|
|
|
//#include <TMC2130Stepper.h>
|
|
|
|
//#include <TMC2130Stepper_REGDEFS.h>
|
|
|
|
|
|
|
|
/*
|
2014-05-05 12:50:13 -06:00
|
|
|
//end of add your includes here
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
void loop();
|
|
|
|
void setup();
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
2019-12-02 14:07:28 -07:00
|
|
|
*/
|
2014-05-05 12:50:13 -06:00
|
|
|
|
|
|
|
//add your function definitions for the project farmbot_arduino_controller here
|
|
|
|
|
2019-12-02 14:07:28 -07:00
|
|
|
void setPinInputOutput();
|
|
|
|
void startSerial();
|
|
|
|
|
2020-02-11 13:32:04 -07:00
|
|
|
#if defined(FARMDUINO_EXP_V20) || defined(FARMDUINO_V30)
|
2019-12-02 14:07:28 -07:00
|
|
|
void loadTMC2130drivers();
|
|
|
|
void loadTMC2130parameters();
|
|
|
|
void startupTmc();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void startMotor();
|
|
|
|
void readParameters();
|
|
|
|
void loadMovementSetting();
|
|
|
|
void startPinGuard();
|
|
|
|
void startServo();
|
|
|
|
void startInterrupt();
|
|
|
|
void homeOnBoot();
|
2020-01-05 14:20:48 -07:00
|
|
|
void setupTestForDebug();
|
2019-12-02 14:07:28 -07:00
|
|
|
void runTestForDebug();
|
|
|
|
void checkEncoders();
|
|
|
|
void checkPinGuard();
|
|
|
|
void checkSerialInputs();
|
|
|
|
void checkEmergencyStop();
|
|
|
|
void checkParamsChanged();
|
|
|
|
void periodicChecksAndReport();
|
|
|
|
void initLastAction();
|
2014-05-05 12:50:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
//Do not add code below this line
|
2019-12-02 14:07:28 -07:00
|
|
|
#endif /* _farmbot_arduino_controller_H_ */
|