diff --git a/platformio.ini b/platformio.ini index 4e0448e..e578319 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,10 +13,11 @@ monitor_speed = 115200 framework = arduino test_build_project_src = true lib_deps = - adafruit/Adafruit TSL2591 Library @ ^1.3.1 - adafruit/Adafruit ADS1X15 @ ^2.1.1 - adafruit/Adafruit BusIO @ ^1.7.3 - SPI + adafruit/Adafruit TSL2591 Library @ ^1.3.1 + adafruit/Adafruit ADS1X15 @ ^2.1.1 + adafruit/Adafruit BusIO @ ^1.7.3 + SPI + waspinator/AccelStepper@^1.61 lib_ldf_mode = chain [env:nano] diff --git a/src/boards.h b/src/boards.h index 60cf1e0..5d8db48 100644 --- a/src/boards.h +++ b/src/boards.h @@ -50,6 +50,23 @@ #define ENDSTOPS_PULLUPS true #define WIRING_ENDSTOPS_MIN {A0,A1,A2} #define WIRING_ENDSTOPS_MAX {A3,A4,A5} + #define ADDITIONAL_STEPPERS 1 + #define WIRING_ADDITIONAL_STEPPERS = {{0, 1, 22, 23}} + #define WIRING_STEPSTICK {13,14,15} //enable, step, dir todo: move to boards.h + //TODO: illumination, 4th motor wiring +#elif defined(BOARD_SANGABOARDv5) + #define BOARD_STRING "Sangaboard v0.5" + #define WIRING_MOTOR_X 2, 3, 4, 5 + #define WIRING_MOTOR_Y 6, 7, 16, 17 + #define WIRING_MOTOR_Z 18, 19, 20, 21 + #define ENDSTOPS_INVERT false + #define ENDSTOPS_PULLUPS true + #define WIRING_ENDSTOPS_MIN {26,27,28} + //#define WIRING_ENDSTOPS_MAX {22,23,0} //not normally used + #define ADDITIONAL_STEPPERS 1 + #define WIRING_ADDITIONAL_STEPPERS = {{0, 1, 22, 23}} + #define WIRING_STEPSTICK {23,22,1} //enable, step, dir todo: move to boards.h + //TODO: illumination, 4th motor wiring #elif defined(BOARD_CUSTOM_ESP32) #define BOARD_STRING "Custom ESP32 board" #define WIRING_MOTOR_X 34, 32, 25, 27 @@ -59,4 +76,17 @@ #define ENDSTOPS_PULLUPS true #define WIRING_ENDSTOPS_MIN {A0,A1,A2} #define WIRING_ENDSTOPS_MAX {A3,A4,A5} + #define WIRING_STEPSTICK {13,12,27} +#elif defined(BOARD_CUSTOM) + #define BOARD_STRING "Sangaboard v0.5" + #define WIRING_MOTOR_X 2, 3, 4, 5 + #define WIRING_MOTOR_Y 2, 3, 4, 5 + #define WIRING_MOTOR_Z 2, 3, 4, 5 + #define ENDSTOPS_INVERT false + #define ENDSTOPS_PULLUPS true + #define WIRING_ENDSTOPS_MIN {1,2,0} + //#define WIRING_ENDSTOPS_MAX {22,23,0} //not normally used + #define ADDITIONAL_STEPPERS 1 + #define WIRING_ADDITIONAL_STEPPERS = {{0, 1, 22, 23}} + #define WIRING_STEPSTICK {8,9,10} //enable, step, dir todo: move to boards.h #endif \ No newline at end of file diff --git a/src/config.h b/src/config.h index bf0ee9e..bbeba30 100644 --- a/src/config.h +++ b/src/config.h @@ -1,8 +1,16 @@ #ifndef CONFIGURED //board choice - #define BOARD_AUTO + //#define BOARD_AUTO //#define BOARD_SANGABOARDv3 //#define BOARD_SANGABOARDv2 + #define BOARD_SANGABOARDv5 + //#define BOARD_CUSTOM_ESP32 + //#define BOARD_CUSTOM_PICO + + //default to USB serial for now + //#define SERIAL_PORT PiSerial + #define SERIAL_PORT Serial + //#define BOARD_CUSTOM #include //defines wiring @@ -10,7 +18,7 @@ #define MAX_COMMANDS 50 #define MAX_MODULES 10 #define MAX_ARGUMENT_LENGTH 20 //used in argument parsing, takes up ram - #define VERSION_STRING "Sangaboard Firmware v1.0-beta" + #define VERSION_STRING "Sangaboard Firmware v0.4" //temporary hack #define DEBUG_ON //module choice @@ -18,6 +26,8 @@ #define STAGE // #define ENDSTOPS // #define LIGHT_SENSOR + // #define STEPSTICK + // #define ILLUMINATION //module configs #ifdef STAGE