├── Marlin
├── example_configurations
│ ├── delta
│ │ ├── Anycubic
│ │ │ └── Kossel
│ │ │ │ ├── images
│ │ │ │ ├── Version1Probe.jpg
│ │ │ │ └── Version2Probe.jpg
│ │ │ │ └── README.md
│ │ ├── kossel_pro
│ │ │ └── README.md
│ │ └── kossel_xl
│ │ │ └── README.md
│ ├── Micromake
│ │ └── C1
│ │ │ └── README.md
│ ├── AliExpress
│ │ └── CL-260
│ │ │ └── README.txt
│ ├── Velleman
│ │ ├── K8400
│ │ │ └── README.md
│ │ └── K8200
│ │ │ └── README.md
│ ├── Creality
│ │ ├── Ender-2
│ │ │ └── README.md
│ │ └── Ender-3
│ │ │ └── README.md
│ ├── BQ
│ │ └── Hephestos_2
│ │ │ └── README.md
│ ├── Felix
│ │ └── README.md
│ ├── Malyan
│ │ └── M150
│ │ │ └── README.md
│ └── JGAurora
│ │ └── A5
│ │ └── README.md
├── pins_STB_11.h
├── pins_AZTEEG_X1.h
├── pins_MELZI_MAKR3D.h
├── pins_MELZI.h
├── Conditionals.h
├── pins_RAMPS_ENDER_4.h
├── blinkm.h
├── pins_GT2560_REV_A_PLUS.h
├── types.h
├── status_screen_lite_ST7920_spi.h
├── pca9632.h
├── pins_K8200.h
├── thermistortable_998.h
├── thermistortable_999.h
├── thermistortable_110.h
├── thermistortable_147.h
├── thermistortable_1047.h
├── pins_SANGUINOLOLU_12.h
├── watchdog.h
├── pins_MAKEBOARD_MINI.h
├── power.h
├── pins_TRIGORILLA_13.h
├── emergency_parser.cpp
├── thermistortable_1010.h
├── pins_MKS_BASE_HEROIC.h
├── pins_ZRIB_V20.h
├── pins_RAMPS_13.h
├── language_pl.h
├── pins_SAINSMART_2IN1.h
├── planner_bezier.h
├── blinkm.cpp
├── neopixel.h
├── thermistortable_8.h
├── thermistortable_4.h
├── MarlinConfig.h
├── hex_print_routines.h
├── pins_MKS_GEN_L.h
├── thermistortable_70.h
├── pins_BAM_DICE_DUE.h
├── thermistortable_13.h
├── bitmap_flags.h
├── SdFatUtil.h
├── pins_MKS_BASE.h
├── thermistortable_3.h
├── SdFile.h
├── pins_MELZI_MALYAN.h
├── thermistortable_66.h
├── pins_MKS_BASE_15.h
├── pins_GEN6_DELUXE.h
├── thermistortable_501.h
├── thermistortable_10.h
├── thermistortable_9.h
├── pins_GEN7_13.h
├── thermistortable_12.h
├── pins_FELIX2.h
├── pins_MELZI_TRONXY.h
├── serial.cpp
├── MarlinSPI.h
├── runout.cpp
├── pins_RIGIDBOARD_V2.h
├── point_t.h
├── pins_K8400.h
├── dogm_font_data_Marlin_symbols.h
├── neopixel.cpp
├── hex_print_routines.cpp
├── thermistortable_2.h
├── Marlin.ino
├── thermistortable_6.h
├── thermistortable_15.h
├── thermistortable_5.h
├── stepper_dac.h
├── thermistortable_52.h
├── thermistortable_55.h
├── mesh_bed_leveling.cpp
├── thermistortable_11.h
├── dac_mcp4728.h
├── delay.h
├── thermistortable_7.h
├── pins_CHEAPTRONIC.h
├── pins_TRIGORILLA_14.h
├── least_squares_fit.cpp
├── thermistortable_1.h
├── thermistortable_51.h
├── fwretract.h
├── thermistortable_71.h
├── SdFatUtil.cpp
├── vector_3.h
├── digipot_mcp4451.cpp
├── power_loss_recovery.h
├── pins_LEAPFROG.h
├── watchdog.cpp
├── pins_RAMPS_PLUS.h
├── pins_SILVER_GATE.h
├── runout.h
├── stopwatch.cpp
├── pins_GEN3_MONOLITHIC.h
├── pins_GEN3_PLUS.h
├── pins_AZTEEG_X3.h
└── nozzle.h
├── .gitattributes
├── .github
├── pull_request_template.md
└── issue_template.md
└── .gitignore
/Marlin/example_configurations/delta/Anycubic/Kossel/images/Version1Probe.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zen/Marlin/1.1.x/Marlin/example_configurations/delta/Anycubic/Kossel/images/Version1Probe.jpg
--------------------------------------------------------------------------------
/Marlin/example_configurations/delta/Anycubic/Kossel/images/Version2Probe.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zen/Marlin/1.1.x/Marlin/example_configurations/delta/Anycubic/Kossel/images/Version2Probe.jpg
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Set the default behavior, in case people don't have core.autocrlf set.
2 | * text=auto
3 |
4 | # Files with Unix line endings
5 | *.c text eol=lf
6 | *.cpp text eol=lf
7 | *.h text eol=lf
8 | *.ino text eol=lf
9 | *.py text eol=lf
10 | *.sh text eol=lf
11 | *.scad text eol=lf
12 |
13 | # Files with native line endings
14 | # *.sln text
15 |
16 | # Binary files
17 | *.png binary
18 | *.jpg binary
19 | *.fon binary
20 |
21 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/delta/kossel_pro/README.md:
--------------------------------------------------------------------------------
1 | # Example Configuration for OpenBeam Kossel Pro [BRAINWAVE_PRO](http://www.openbeamusa.com/3d-printers/kossel/)
2 | * Configuration files for the **Openbeam Kossel Pro** as delivered in their KickStarter distribution
3 |
4 | I [@Wackerbarth](https://github.com/Wackerbarth) tested this version on my Kossel Pro and Arduino 1.6.5 for Mac.
5 | This configuration is a transition to merge Terence Tam's configuration with up-to-date Marlin source and a current Arduino IDE
6 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/Micromake/C1/README.md:
--------------------------------------------------------------------------------
1 | # Micromake C1
2 |
3 | ### In the folder "basic"
4 | Configuration files for Micromake C1 without mods
5 | - English LCD 2X16 Characters
6 | - Motors 16 STEPS
7 | - No heated bed
8 | - No probe, etc.
9 | - Like a standard C1 as shipped by Micromake.
10 |
11 | ### In the folder "enhanced"
12 | Configuration files for Micromake C1 with…
13 | - 128 STEPS configured with jumper on the motherboard (all open for 128 Steps).
14 | - Capacitive Probe (Adjust offsets at your convenience)
15 | - French language with no accents for Japanese LCD.
16 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/AliExpress/CL-260/README.txt:
--------------------------------------------------------------------------------
1 | This is an example configuration for the CL-260 Ultimaker 2 clone.
2 | Change Z_MAX_POS to 300 for the CL-260MAX.
3 |
4 | (The printer is available on AliExpress; be aware that this is not a beginner's
5 | printer -- it needs tweaking and some parts replaced before being decent.)
6 |
7 | The printer comes with a quite old Marlin, the sources are available here:
8 | http://www.thingiverse.com/thing:1635830/ and I recommend replacing them.
9 |
10 | The setting "works" for my printer and the extruder using my calibration value.
11 | You might want to tweak some settings, e.g enable EEPROM, increase default Z speed, adjust homing speeds,...
12 |
13 | Have fun!
14 | --
15 | tobi
16 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ### Requirements
2 |
3 | * Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.
4 |
5 | ### Description
6 |
7 |
12 |
13 | ### Benefits
14 |
15 |
16 |
17 | ### Related Issues
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/Velleman/K8400/README.md:
--------------------------------------------------------------------------------
1 | # Configuration for Velleman K8400 Vertex
2 | http://www.k8400.eu/
3 |
4 | Configuration files for the K8400, ported upstream from the official Velleman firmware.
5 | Like its predecessor, (K8200), the K8400 is a 3Drag clone. There are some minor differences, documented in pins_K8400.h.
6 |
7 | Single and dual head configurations provided. Copy the correct Configuration.h and Configuration_adv.h to the /src/config directory.
8 |
9 | **NOTE: This configuration includes the community sourced feed rate fix. Use 100% feed rate in Repetier!**
10 |
11 | For implementation and updated K8400 firmware, see https://github.com/birkett/Velleman-K8400-Firmware
12 |
13 | ### Original Sources
14 | Credit to Velleman for the original 1.0.x based code:
15 | http://www.vertex3dprinter.eu/downloads/files/vertex/firmware/vertex-m1-v1.4-h2.zip
16 |
--------------------------------------------------------------------------------
/Marlin/pins_STB_11.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * STB V1.1 pin assignments
25 | */
26 |
27 | #define BOARD_NAME "STB V1.1"
28 | #include "pins_SANGUINOLOLU_12.h"
29 |
--------------------------------------------------------------------------------
/Marlin/pins_AZTEEG_X1.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Azteeg X1 pin assignments
25 | */
26 |
27 | #define BOARD_NAME "Azteeg X1"
28 |
29 | #include "pins_SANGUINOLOLU_12.h"
30 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/Creality/Ender-2/README.md:
--------------------------------------------------------------------------------
1 | # Creality Ender Support
2 |
3 | This branch is a reverse-engineered version based on the unpublished firmware from Creality. It is **not** the authoritative source, but has been carefully re-built by looking at their firmware and inferring the base version and configuration they used. The basis is the firmware version from "Jul 31 2017 10:16:30". It is based on Marlin 1.0.1, because
4 |
5 | * 1.0.0 had very different serial output in `setup()` and overall code structure.
6 | * 1.0.2 changed the `VERSION_STRING` to include a leading space, and `lcd_init` uses `SET_INPUT` instead of `pinMode`.
7 |
8 | Configurations were found by seeing what code was compiled into the firmware, and constants used there.
9 |
10 | For U8Glib, at least version 1.14 and at most 1.17 is used, because
11 |
12 | * 1.12 didn't have the extra speed argument to u8g_InitCom.
13 | * 1.13 didn't have the soft reset instruction for UC1701 initialization.
14 | * 1.18 has a new directory structure.
15 |
16 | ## Bitmaps
17 |
18 | The bootscreen and custom status screens come from Creality's firmware.
19 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/Creality/Ender-3/README.md:
--------------------------------------------------------------------------------
1 | # Creality Ender Support
2 |
3 | This branch is a reverse-engineered version based on the unpublished firmware from Creality. It is **not** the authoritative source, but has been carefully re-built by looking at their firmware and inferring the base version and configuration they used. The basis is the firmware version from "Jul 31 2017 10:16:30". It is based on Marlin 1.0.1, because
4 |
5 | * 1.0.0 had very different serial output in `setup()` and overall code structure.
6 | * 1.0.2 changed the `VERSION_STRING` to include a leading space, and `lcd_init` uses `SET_INPUT` instead of `pinMode`.
7 |
8 | Configurations were found by seeing what code was compiled into the firmware, and constants used there.
9 |
10 | For U8Glib, at least version 1.14 and at most 1.17 is used, because
11 |
12 | * 1.12 didn't have the extra speed argument to u8g_InitCom.
13 | * 1.13 didn't have the soft reset instruction for UC1701 initialization.
14 | * 1.18 has a new directory structure.
15 |
16 | ## Bitmaps
17 |
18 | The bootscreen and custom status screens come from Creality's firmware.
19 |
--------------------------------------------------------------------------------
/Marlin/pins_MELZI_MAKR3D.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Melzi with ATmega1284 (MaKr3d version) pin assignments
25 | */
26 |
27 | #define BOARD_NAME "Melzi (ATmega1284)"
28 | #include "pins_MELZI.h"
29 |
--------------------------------------------------------------------------------
/Marlin/pins_MELZI.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Melzi pin assignments
25 | */
26 |
27 | #ifndef BOARD_NAME
28 | #define BOARD_NAME "Melzi"
29 | #endif
30 |
31 | #define IS_MELZI
32 | #include "pins_SANGUINOLOLU_12.h"
33 |
--------------------------------------------------------------------------------
/Marlin/Conditionals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Conditionals.h
25 | * OBSOLETE: Replaced by Conditionals_LCD.h and Conditionals_post.h
26 | */
27 | #error "Old configurations? Please delete all #include lines from Configuration.h and Configuration_adv.h."
28 |
--------------------------------------------------------------------------------
/Marlin/pins_RAMPS_ENDER_4.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #if HOTENDS > 1 || E_STEPPERS > 1
24 | #error "Ender-4 supports only 1 hotend / E-stepper. Comment out this line to continue."
25 | #endif
26 |
27 | #define BOARD_NAME "Ender-4"
28 |
29 | #include "pins_RAMPS.h"
30 |
--------------------------------------------------------------------------------
/Marlin/blinkm.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * blinkm.h - Control a BlinkM over i2c
25 | */
26 |
27 | #ifndef _BLINKM_H_
28 | #define _BLINKM_H_
29 |
30 | struct LEDColor;
31 | typedef LEDColor LEDColor;
32 |
33 | void blinkm_set_led_color(const LEDColor &color);
34 |
35 | #endif // _BLINKM_H_
36 |
--------------------------------------------------------------------------------
/Marlin/pins_GT2560_REV_A_PLUS.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Geeetech GT2560 Revision A+ board pin assignments
25 | */
26 |
27 | #define BOARD_NAME "GT2560 Rev.A+"
28 |
29 | #include "pins_GT2560_REV_A.h"
30 |
31 | #if ENABLED(BLTOUCH)
32 | #define SERVO0_PIN 11
33 | #else
34 | #define SERVO0_PIN 32
35 | #endif
36 |
--------------------------------------------------------------------------------
/Marlin/types.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #ifndef __TYPES_H__
24 | #define __TYPES_H__
25 |
26 | #include
27 |
28 | typedef unsigned long millis_t;
29 |
30 | typedef struct {
31 | int8_t x_index, y_index;
32 | float distance; // When populated, the distance from the search location
33 | } mesh_index_pair;
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/Marlin/status_screen_lite_ST7920_spi.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Lightweight Status Screen for the RepRapDiscount Full
3 | * Graphics Smart Controller (ST7920-based 128x64 LCD)
4 | *
5 | * (c) 2017 Aleph Objects, Inc.
6 | *
7 | * The code in this page is free software: you can
8 | * redistribute it and/or modify it under the terms of the GNU
9 | * General Public License (GNU GPL) as published by the Free Software
10 | * Foundation, either version 3 of the License, or (at your option)
11 | * any later version. The code is distributed WITHOUT ANY WARRANTY;
12 | * without even the implied warranty of MERCHANTABILITY or FITNESS
13 | * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
14 | *
15 | */
16 |
17 | #include "status_screen_lite_ST7920_class.h"
18 |
19 | void ST7920_Lite_Status_Screen::cs() {
20 | ST7920_CS();
21 | current_bits.synced = false;
22 | }
23 |
24 | void ST7920_Lite_Status_Screen::ncs() {
25 | ST7920_NCS();
26 | current_bits.synced = false;
27 | }
28 |
29 | void ST7920_Lite_Status_Screen::sync_cmd() {
30 | ST7920_SET_CMD();
31 | }
32 |
33 | void ST7920_Lite_Status_Screen::sync_dat() {
34 | ST7920_SET_DAT();
35 | }
36 |
37 | void ST7920_Lite_Status_Screen::write_byte(const uint8_t data) {
38 | ST7920_WRITE_BYTE(data);
39 | }
40 |
--------------------------------------------------------------------------------
/Marlin/pca9632.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Driver for the Philips PCA9632 LED driver.
25 | * Written by Robert Mendon Feb 2017.
26 | */
27 |
28 | #ifndef __PCA9632_H__
29 | #define __PCA9632_H__
30 |
31 | struct LEDColor;
32 | typedef LEDColor LEDColor;
33 |
34 | void pca9632_set_led_color(const LEDColor &color);
35 |
36 | #endif // __PCA9632_H__
37 |
--------------------------------------------------------------------------------
/Marlin/pins_K8200.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * K8200 Arduino Mega with RAMPS v1.3 pin assignments
25 | * Identical to 3DRAG
26 | */
27 |
28 | #define BOARD_NAME "Velleman K8200"
29 | #define DEFAULT_MACHINE_NAME "K8200"
30 | #define DEFAULT_SOURCE_CODE_URL "https://github.com/CONSULitAS/Marlin-K8200"
31 |
32 | #include "pins_3DRAG.h"
33 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_998.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // User-defined table 1
24 | // Dummy Thermistor table.. It will ALWAYS read a fixed value.
25 | #ifndef DUMMY_THERMISTOR_998_VALUE
26 | #define DUMMY_THERMISTOR_998_VALUE 25
27 | #endif
28 |
29 | const short temptable_998[][2] PROGMEM = {
30 | { OV( 1), DUMMY_THERMISTOR_998_VALUE },
31 | { OV(1023), DUMMY_THERMISTOR_998_VALUE }
32 | };
33 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_999.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // User-defined table 2
24 | // Dummy Thermistor table.. It will ALWAYS read a fixed value.
25 | #ifndef DUMMY_THERMISTOR_999_VALUE
26 | #define DUMMY_THERMISTOR_999_VALUE 25
27 | #endif
28 |
29 | const short temptable_999[][2] PROGMEM = {
30 | { OV( 1), DUMMY_THERMISTOR_999_VALUE },
31 | { OV(1023), DUMMY_THERMISTOR_999_VALUE }
32 | };
33 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_110.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // Pt100 with 1k0 pullup
24 | const short temptable_110[][2] PROGMEM = {
25 | // only a few values are needed as the curve is very flat
26 | PtLine( 0, 100, 1000)
27 | PtLine( 50, 100, 1000)
28 | PtLine(100, 100, 1000)
29 | PtLine(150, 100, 1000)
30 | PtLine(200, 100, 1000)
31 | PtLine(250, 100, 1000)
32 | PtLine(300, 100, 1000)
33 | };
34 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_147.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // Pt100 with 4k7 pullup
24 | const short temptable_147[][2] PROGMEM = {
25 | // only a few values are needed as the curve is very flat
26 | PtLine( 0, 100, 4700)
27 | PtLine( 50, 100, 4700)
28 | PtLine(100, 100, 4700)
29 | PtLine(150, 100, 4700)
30 | PtLine(200, 100, 4700)
31 | PtLine(250, 100, 4700)
32 | PtLine(300, 100, 4700)
33 | };
34 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_1047.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // Pt1000 with 4k7 pullup
24 | const short temptable_1047[][2] PROGMEM = {
25 | // only a few values are needed as the curve is very flat
26 | PtLine( 0, 1000, 4700)
27 | PtLine( 50, 1000, 4700)
28 | PtLine(100, 1000, 4700)
29 | PtLine(150, 1000, 4700)
30 | PtLine(200, 1000, 4700)
31 | PtLine(250, 1000, 4700)
32 | PtLine(300, 1000, 4700)
33 | };
34 |
--------------------------------------------------------------------------------
/Marlin/pins_SANGUINOLOLU_12.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Sanguinololu V1.2 pin assignments
25 | *
26 | * Applies to the following boards:
27 | *
28 | * AZTEEG_X1
29 | * MELZI
30 | * MELZI_CREALITY
31 | * MELZI_MAKR3D
32 | * SANGUINOLOLU_12
33 | * STB_11
34 | */
35 |
36 | #ifndef BOARD_NAME
37 | #define BOARD_NAME "Sanguinololu 1.2"
38 | #endif
39 |
40 | #define SANGUINOLOLU_V_1_2
41 | #include "pins_SANGUINOLOLU_11.h"
42 |
--------------------------------------------------------------------------------
/Marlin/watchdog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #ifndef WATCHDOG_H
24 | #define WATCHDOG_H
25 |
26 | #include "Marlin.h"
27 | #include
28 |
29 | // Initialize watchdog with a 4 second interrupt time
30 | void watchdog_init();
31 |
32 | // Reset watchdog. MUST be called at least every 4 seconds after the
33 | // first watchdog_init or AVR will go into emergency procedures.
34 | inline void watchdog_reset() { wdt_reset(); }
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/Marlin/pins_MAKEBOARD_MINI.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #include "pins_RAMPS.h"
24 |
25 | #undef BOARD_NAME
26 | #define BOARD_NAME "MAKEBOARD_MINI"
27 |
28 | //
29 | // Only 3 Limit Switch plugs on Micromake C1
30 | //
31 | #undef X_MIN_PIN
32 | #undef Y_MIN_PIN
33 | #undef Z_MIN_PIN
34 | #undef X_MAX_PIN
35 | #undef Y_MAX_PIN
36 | #undef Z_MAX_PIN
37 | #define X_STOP_PIN 2
38 | #define Y_STOP_PIN 15
39 | #define Z_STOP_PIN 19
40 |
--------------------------------------------------------------------------------
/Marlin/power.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * power.h - power control
25 | */
26 |
27 | #ifndef POWER_H
28 | #define POWER_H
29 |
30 | #include "types.h"
31 |
32 | class Power {
33 | public:
34 | static void check();
35 | static void power_on();
36 | static void power_off();
37 | private:
38 | static millis_t lastPowerOn;
39 | static bool is_power_needed();
40 | };
41 |
42 | extern Power powerManager;
43 |
44 | #endif // POWER_H
45 |
--------------------------------------------------------------------------------
/Marlin/pins_TRIGORILLA_13.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Arduino Mega with RAMPS v1.3 for Anycubic
25 | */
26 |
27 | #ifndef BOARD_NAME
28 | #define BOARD_NAME "Anycubic RAMPS 1.3"
29 | #endif
30 |
31 | #define IS_RAMPS_EFB
32 | #define RAMPS_D9_PIN 44
33 | #define FAN2_PIN 9
34 | #define ORIG_E0_AUTO_FAN_PIN 9
35 |
36 | #include "pins_RAMPS_13.h"
37 |
38 | #undef E1_STEP_PIN
39 | #undef E1_DIR_PIN
40 | #undef E1_ENABLE_PIN
41 | #undef E1_CS_PIN
42 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/delta/kossel_xl/README.md:
--------------------------------------------------------------------------------
1 | # Configuration for Kossel k800 XL
2 | This example configuration is for a Kossel XL with a printable bed diameter of 280mm and a height of 380mm. It also has the auto bed leveling probe (with an endstop switch) and the heated bed activated.
3 |
4 | ## Configuration
5 | You might need (or want) to edit at least the following settings in `Configuration.h`:
6 | * `MANUAL_Z_HOME_POS` - The available height of your printing space. Auto Bed Leveling makes it less important to have the exact value.
7 | * `DELTA_PRINTABLE_RADIUS` - The printable radius is how far from the center the nozzle can reach.
8 | * `DEFAULT_AXIS_STEPS_PER_UNIT` - Steps-per-millimeter for the delta steppers, and for the extruder [to optimize the amount of filament flow](http://zennmaster.com/makingstuff/reprap-101-calibrating-your-extruder-part-1-e-steps).
9 |
10 | ### Fine tuning
11 | * Increase `DELTA_RADIUS` if the model comes out convex (with a bulge in the middle)
12 | * Increase `DELTA_DIAGONAL_ROD` if the model comes out larger than expected
13 |
14 | ### [http://reprap.org/wiki/PID_Tuning](PID Tuning)
15 | * `DEFAULT_Kp` - The proportional term
16 | * `DEFAULT_Ki` - The integral term
17 | * `DEFAULT_Kd` - The derivative term
18 |
19 | ### PSU Options
20 | * The power supply is configured to 2 (to use a relay to switch 12V on and off)
21 | * It is configured to be off by default
22 |
--------------------------------------------------------------------------------
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 |
10 |
11 | ### Description
12 |
13 |
14 |
15 | ### Steps to Reproduce
16 |
17 |
18 |
19 | 1. [First Step]
20 | 2. [Second Step]
21 | 3. [and so on...]
22 |
23 | **Expected behavior:** [What you expect to happen]
24 |
25 | **Actual behavior:** [What actually happens]
26 |
27 | #### Additional Information
28 |
29 | * Include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
30 | * Provide pictures or links to videos that clearly demonstrate the issue.
31 | * See [How Can I Contribute](https://github.com/MarlinFirmware/Marlin/blob/1.1.x/.github/contributing.md#how-can-i-contribute) for additional guidelines.
32 |
--------------------------------------------------------------------------------
/Marlin/emergency_parser.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * emergency_parser.cpp - Intercept special commands directly in the serial stream
25 | */
26 |
27 | #include "MarlinConfig.h"
28 |
29 | #if ENABLED(EMERGENCY_PARSER)
30 |
31 | #include "emergency_parser.h"
32 |
33 | // Static data members
34 | bool EmergencyParser::killed_by_M112; // = false
35 | EmergencyParser::State EmergencyParser::state; // = EP_RESET
36 |
37 | // Global instance
38 | EmergencyParser emergency_parser;
39 |
40 | #endif // EMERGENCY_PARSER
41 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_1010.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // Pt1000 with 1k0 pullup
24 | const short temptable_1010[][2] PROGMEM = {
25 | PtLine( 0, 1000, 1000)
26 | PtLine( 25, 1000, 1000)
27 | PtLine( 50, 1000, 1000)
28 | PtLine( 75, 1000, 1000)
29 | PtLine(100, 1000, 1000)
30 | PtLine(125, 1000, 1000)
31 | PtLine(150, 1000, 1000)
32 | PtLine(175, 1000, 1000)
33 | PtLine(200, 1000, 1000)
34 | PtLine(225, 1000, 1000)
35 | PtLine(250, 1000, 1000)
36 | PtLine(275, 1000, 1000)
37 | PtLine(300, 1000, 1000)
38 | };
39 |
--------------------------------------------------------------------------------
/Marlin/pins_MKS_BASE_HEROIC.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * MKS BASE with Heroic HR4982 stepper drivers
25 | */
26 |
27 | #include "pins_MKS_BASE_15.h"
28 |
29 | /**
30 | * Some new boards use HR4982 (Heroic) instead of the A4982 (Allegro) stepper drivers.
31 | * Most the functionality is similar, the HR variant obviously doesn't work with diode
32 | * smoothers (no fast decay). And the Heroic has a 128 µStepping mode where the A4982
33 | * is doing quarter steps (MS1=0, MS2=1).
34 | */
35 | #define HEROIC_STEPPER_DRIVERS
36 |
--------------------------------------------------------------------------------
/Marlin/pins_ZRIB_V20.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * ZRIB V2.0 pin assignments
25 | */
26 |
27 | #define ZRIB_V20_D6_PIN 6
28 | #define ZRIB_V20_D9_PIN 9
29 | #define RAMPS_D9_PIN ZRIB_V20_D6_PIN
30 | #define ORIG_E0_AUTO_FAN_PIN ZRIB_V20_D9_PIN
31 | #define ORIG_E1_AUTO_FAN_PIN ZRIB_V20_D9_PIN
32 | #define ORIG_E2_AUTO_FAN_PIN ZRIB_V20_D9_PIN
33 | #define ORIG_E3_AUTO_FAN_PIN ZRIB_V20_D9_PIN
34 |
35 | #ifndef FILWIDTH_PIN
36 | #define FILWIDTH_PIN 11 // Analog Input
37 | #endif
38 |
39 | #include "pins_MKS_GEN_13.h"
40 |
--------------------------------------------------------------------------------
/Marlin/pins_RAMPS_13.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Arduino Mega with RAMPS v1.3 pin assignments
25 | *
26 | * Applies to the following boards:
27 | *
28 | * RAMPS_13_EFB (Extruder, Fan, Bed)
29 | * RAMPS_13_EEB (Extruder, Extruder, Bed)
30 | * RAMPS_13_EFF (Extruder, Fan, Fan)
31 | * RAMPS_13_EEF (Extruder, Extruder, Fan)
32 | * RAMPS_13_SF (Spindle, Controller Fan)
33 | *
34 | */
35 |
36 | #ifndef BOARD_NAME
37 | #define BOARD_NAME "RAMPS 1.3"
38 | #endif
39 |
40 | #define IS_RAMPS_13
41 | #include "pins_RAMPS.h"
42 |
--------------------------------------------------------------------------------
/Marlin/language_pl.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Polish
25 | *
26 | * LCD Menu Messages
27 | * See also http://marlinfw.org/docs/development/lcd_language.html
28 | *
29 | */
30 | #ifndef LANGUAGE_PL_H
31 | #define LANGUAGE_PL_H
32 |
33 | #define MAPPER_C3C4C5_PL
34 | #define DISPLAY_CHARSET_ISO10646_PL
35 |
36 | /**
37 | * One version with accented characters and one without
38 | */
39 | #if ENABLED(DOGLCD)
40 | #include "language_pl-DOGM.h"
41 | #else
42 | #include "language_pl-HD44780.h"
43 | #endif
44 |
45 | #endif // LANGUAGE_PL_H
46 |
--------------------------------------------------------------------------------
/Marlin/pins_SAINSMART_2IN1.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Sainsmart 2-in-1 pin assignments
25 | */
26 |
27 | #if HOTENDS > 2 || E_STEPPERS > 2
28 | #error "Sainsmart 2-in-1 supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 | #endif
30 |
31 | #define BOARD_NAME "Sainsmart"
32 |
33 | //
34 | // Heaters / Fans
35 | //
36 | #define RAMPS_D10_PIN 9 // E
37 | #define RAMPS_D9_PIN 7 // F PART FAN in front of board next to Extruder heat
38 | // RAMPS_D8_PIN 8 // B
39 | #define MOSFET_D_PIN 10 // F / E
40 |
41 | #include "pins_RAMPS.h"
42 |
--------------------------------------------------------------------------------
/Marlin/planner_bezier.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * planner_bezier.h
25 | *
26 | * Compute and buffer movement commands for bezier curves
27 | *
28 | */
29 |
30 | #ifndef PLANNER_BEZIER_H
31 | #define PLANNER_BEZIER_H
32 |
33 | #include "Marlin.h"
34 |
35 | void cubic_b_spline(
36 | const float position[NUM_AXIS], // current position
37 | const float target[NUM_AXIS], // target position
38 | const float offset[4], // a pair of offsets
39 | float fr_mm_s,
40 | uint8_t extruder
41 | );
42 |
43 | #endif // PLANNER_BEZIER_H
44 |
--------------------------------------------------------------------------------
/Marlin/blinkm.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * blinkm.cpp - Control a BlinkM over i2c
25 | */
26 |
27 | #include "MarlinConfig.h"
28 |
29 | #if ENABLED(BLINKM)
30 |
31 | #include "blinkm.h"
32 | #include "leds.h"
33 | #include
34 |
35 | void blinkm_set_led_color(const LEDColor &color) {
36 | Wire.begin();
37 | Wire.beginTransmission(0x09);
38 | Wire.write('o'); //to disable ongoing script, only needs to be used once
39 | Wire.write('n');
40 | Wire.write(color.r);
41 | Wire.write(color.g);
42 | Wire.write(color.b);
43 | Wire.endTransmission();
44 | }
45 |
46 | #endif // BLINKM
47 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/BQ/Hephestos_2/README.md:
--------------------------------------------------------------------------------
1 | # Example Configuration for BQ [Hephestos 2](http://www.bq.com/uk/hephestos-2)
2 | Based on the original configuration file shipped with the heavily modified Marlin fork by BQ.
3 | The forked firmware and configuration files can be found at the [BQ Github repository](https://github.com/bq/Marlin).
4 |
5 | NOTE: The look and feel of the LCD menu will change dramatically when using the original Marlin firmware.
6 |
7 | ## Changelog
8 | * 2018/05/30 - Configuration updated to the latest Marlin version (43a55a9af).
9 | ABL Bilinear 5x5 is active by default.
10 |
11 | * 2017/07/06 - Configuration updated to the latest Marlin version and added support for the
12 | official BQ heated bed upgrade kit.
13 |
14 | * 2016/12/13 - Configuration updated to the latest Marlin version.
15 |
16 | * 2016/07/13 - Configuration updated to the latest Marlin version.
17 |
18 | * 2016/06/21 - Disabled heated bed related options, activated software endstops and SD printing now
19 | disables the heater when finishes printing.
20 |
21 | * 2016/03/21 - Activated 4-point auto leveling by default and updated miscellaneous z-probe values.
22 |
23 | * 2016/03/01 - The first release of Marlin's configuration file for the
24 | BQ Hephestos 2 3D printer.
25 |
26 |
27 | ## Support
28 | This configuration should work easily with the stock Hephestos 2, nevertheless if you encounter any
29 | issues you may contact me on [Github](https://github.com/jbrazio), [Twitter](https://twitter.com/jbrazio) or by mail.
30 |
--------------------------------------------------------------------------------
/Marlin/neopixel.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * neopixel.h
25 | */
26 |
27 | #include "MarlinConfig.h"
28 |
29 | #define NEOPIXEL_IS_RGB (NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR)
30 | #define NEOPIXEL_IS_RGBW !NEOPIXEL_IS_RGB
31 |
32 | #if NEOPIXEL_IS_RGB
33 | #define NEO_WHITE 255, 255, 255, 0
34 | #else
35 | #define NEO_WHITE 0, 0, 0, 255
36 | #endif
37 |
38 | #include
39 | #include
40 |
41 | void setup_neopixel();
42 | void set_neopixel_color(const uint32_t color);
43 |
44 | extern Adafruit_NeoPixel pixels;
45 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_8.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 3950 K, 10 kOhm pull-up, NTCS0603E3104FHT
24 | const short temptable_8[][2] PROGMEM = {
25 | { OV( 1), 704 },
26 | { OV( 54), 216 },
27 | { OV( 107), 175 },
28 | { OV( 160), 152 },
29 | { OV( 213), 137 },
30 | { OV( 266), 125 },
31 | { OV( 319), 115 },
32 | { OV( 372), 106 },
33 | { OV( 425), 99 },
34 | { OV( 478), 91 },
35 | { OV( 531), 85 },
36 | { OV( 584), 78 },
37 | { OV( 637), 71 },
38 | { OV( 690), 65 },
39 | { OV( 743), 58 },
40 | { OV( 796), 50 },
41 | { OV( 849), 42 },
42 | { OV( 902), 31 },
43 | { OV( 955), 17 },
44 | { OV(1008), 0 }
45 | };
46 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_4.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 10 kOhm, beta25 = 3950 K, 4.7 kOhm pull-up, Generic 10k thermistor
24 | const short temptable_4[][2] PROGMEM = {
25 | { OV( 1), 430 },
26 | { OV( 54), 137 },
27 | { OV( 107), 107 },
28 | { OV( 160), 91 },
29 | { OV( 213), 80 },
30 | { OV( 266), 71 },
31 | { OV( 319), 64 },
32 | { OV( 372), 57 },
33 | { OV( 425), 51 },
34 | { OV( 478), 46 },
35 | { OV( 531), 41 },
36 | { OV( 584), 35 },
37 | { OV( 637), 30 },
38 | { OV( 690), 25 },
39 | { OV( 743), 20 },
40 | { OV( 796), 14 },
41 | { OV( 849), 7 },
42 | { OV( 902), 0 },
43 | { OV( 955), -11 },
44 | { OV(1008), -35 }
45 | };
46 |
--------------------------------------------------------------------------------
/Marlin/MarlinConfig.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #ifndef MARLIN_CONFIG_H
24 | #define MARLIN_CONFIG_H
25 |
26 | #include "boards.h"
27 | #include "macros.h"
28 | #include "Version.h"
29 | #include "Configuration.h"
30 | #include "Conditionals_LCD.h"
31 | #include "drivers.h"
32 | #include "Configuration_adv.h"
33 |
34 | #if USE_MARLINSERIAL
35 | #define HardwareSerial_h // trick to disable the standard HWserial
36 | #endif
37 |
38 | #include "types.h"
39 | #include "HAL.h"
40 | #include "pins.h"
41 | #include "Conditionals_post.h"
42 | #include "SanityCheck.h"
43 | #include "enum.h"
44 | #include "language.h"
45 | #include "utility.h"
46 | #include "serial.h"
47 |
48 | #endif // MARLIN_CONFIG_H
49 |
--------------------------------------------------------------------------------
/Marlin/hex_print_routines.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #ifndef HEX_PRINT_ROUTINES_H
24 | #define HEX_PRINT_ROUTINES_H
25 |
26 | #include
27 |
28 | //
29 | // Utility functions to create and print hex strings as nybble, byte, and word.
30 | //
31 |
32 | inline char hex_nybble(const uint8_t n) {
33 | return (n & 0xF) + ((n & 0xF) < 10 ? '0' : 'A' - 10);
34 | }
35 | char* hex_byte(const uint8_t b);
36 | char* hex_word(const uint16_t w);
37 | char* hex_address(const void * const w);
38 |
39 | void print_hex_nybble(const uint8_t n);
40 | void print_hex_byte(const uint8_t b);
41 | void print_hex_word(const uint16_t w);
42 | void print_hex_address(const void * const w);
43 |
44 | #endif // HEX_PRINT_ROUTINES_H
45 |
--------------------------------------------------------------------------------
/Marlin/pins_MKS_GEN_L.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * MKS GEN L – Arduino Mega2560 with RAMPS v1.4 pin assignments
25 | */
26 |
27 | #if HOTENDS > 2 || E_STEPPERS > 2
28 | #error "MKS GEN L supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 | #endif
30 |
31 | #define BOARD_NAME "MKS GEN L"
32 |
33 | //
34 | // Heaters / Fans
35 | //
36 | // Power outputs EFBF or EFBE
37 | #define MOSFET_D_PIN 7
38 |
39 | //
40 | // CS Pins wired to avoid conflict with the LCD
41 | // See https://www.thingiverse.com/asset:66604
42 | //
43 |
44 | #ifndef X_CS_PIN
45 | #define X_CS_PIN 59
46 | #endif
47 |
48 | #ifndef Y_CS_PIN
49 | #define Y_CS_PIN 63
50 | #endif
51 |
52 | #include "pins_RAMPS.h"
53 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_70.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // Stock BQ Hephestos 2 100k thermistor.
24 | // Created on 29/12/2017 with an ambient temperature of 20C.
25 | // ANENG AN8009 DMM with a K-type probe used for measurements.
26 |
27 | // R25 = 100 kOhm, beta25 = 4100 K, 4.7 kOhm pull-up, bqh2 stock thermistor
28 | const short temptable_70[][2] PROGMEM = {
29 | { OV( 18), 270 },
30 | { OV( 27), 248 },
31 | { OV( 34), 234 },
32 | { OV( 45), 220 },
33 | { OV( 61), 205 },
34 | { OV( 86), 188 },
35 | { OV( 123), 172 },
36 | { OV( 420), 110 },
37 | { OV( 590), 90 },
38 | { OV( 845), 56 },
39 | { OV( 970), 25 },
40 | { OV( 986), 20 },
41 | { OV( 994), 15 },
42 | { OV(1000), 10 },
43 | { OV(1005), 5 },
44 | { OV(1009), 0 } // safety
45 | };
46 |
--------------------------------------------------------------------------------
/Marlin/pins_BAM_DICE_DUE.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * BAM&DICE Due (Arduino Mega) pin assignments
25 | */
26 |
27 | #if HOTENDS > 2 || E_STEPPERS > 2
28 | #error "2PrintBeta Due supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 | #endif
30 |
31 | #define BOARD_NAME "2PrintBeta Due"
32 |
33 | //
34 | // M3/M4/M5 - Spindle/Laser Control
35 | //
36 | #define SPINDLE_LASER_ENABLE_PIN 66 // Pin should have a pullup/pulldown!
37 | #define SPINDLE_DIR_PIN 67
38 | #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
39 |
40 | #include "pins_RAMPS.h"
41 |
42 | //
43 | // Temperature Sensors
44 | //
45 | #undef TEMP_0_PIN
46 | #undef TEMP_1_PIN
47 | #define TEMP_0_PIN 9 // Analog Input
48 | #define TEMP_1_PIN 11 // Analog Input
49 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_13.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 4100 K, 4.7 kOhm pull-up, Hisens thermistor
24 | const short temptable_13[][2] PROGMEM = {
25 | { OV( 20.04), 300 },
26 | { OV( 23.19), 290 },
27 | { OV( 26.71), 280 },
28 | { OV( 31.23), 270 },
29 | { OV( 36.52), 260 },
30 | { OV( 42.75), 250 },
31 | { OV( 50.68), 240 },
32 | { OV( 60.22), 230 },
33 | { OV( 72.03), 220 },
34 | { OV( 86.84), 210 },
35 | { OV(102.79), 200 },
36 | { OV(124.46), 190 },
37 | { OV(151.02), 180 },
38 | { OV(182.86), 170 },
39 | { OV(220.72), 160 },
40 | { OV(316.96), 140 },
41 | { OV(447.17), 120 },
42 | { OV(590.61), 100 },
43 | { OV(737.31), 80 },
44 | { OV(857.77), 60 },
45 | { OV(939.52), 40 },
46 | { OV(986.03), 20 },
47 | { OV(1008.7), 0 }
48 | };
49 |
--------------------------------------------------------------------------------
/Marlin/bitmap_flags.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #ifndef _BITMAP_FLAGS_H_
24 | #define _BITMAP_FLAGS_H_
25 |
26 | #include "macros.h"
27 |
28 | /**
29 | * These support functions allow the use of large bit arrays of flags that take very
30 | * little RAM. Currently they are limited to being 16x16 in size. Changing the declaration
31 | * to unsigned long will allow us to go to 32x32 if higher resolution meshes are needed
32 | * in the future.
33 | */
34 | FORCE_INLINE void bitmap_clear(uint16_t bits[16], const uint8_t x, const uint8_t y) { CBI(bits[y], x); }
35 | FORCE_INLINE void bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { SBI(bits[y], x); }
36 | FORCE_INLINE bool is_bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { return TEST(bits[y], x); }
37 |
38 | #endif // _BITMAP_FLAGS_H_
39 |
--------------------------------------------------------------------------------
/Marlin/SdFatUtil.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Arduino SdFat Library
25 | * Copyright (C) 2008 by William Greiman
26 | *
27 | * This file is part of the Arduino Sd2Card Library
28 | */
29 | #ifndef _SDFATUTIL_H_
30 | #define _SDFATUTIL_H_
31 |
32 | /**
33 | * \file
34 | * \brief Useful utility functions.
35 | */
36 | /** Store and print a string in flash memory.*/
37 | #define PgmPrint(x) SerialPrint_P(PSTR(x))
38 | /** Store and print a string in flash memory followed by a CR/LF.*/
39 | #define PgmPrintln(x) SerialPrintln_P(PSTR(x))
40 |
41 | namespace SdFatUtil {
42 | int FreeRam();
43 | void print_P(PGM_P str);
44 | void println_P(PGM_P str);
45 | void SerialPrint_P(PGM_P str);
46 | void SerialPrintln_P(PGM_P str);
47 | }
48 |
49 | using namespace SdFatUtil; // NOLINT
50 |
51 | #endif // _SDFATUTIL_H_
52 |
--------------------------------------------------------------------------------
/Marlin/pins_MKS_BASE.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments
25 | *
26 | * Rev B - Override pin definitions for CASE_LIGHT and M3/M4/M5 spindle control
27 | */
28 |
29 | #if HOTENDS > 2 || E_STEPPERS > 2
30 | #error "MKS BASE 1.0 supports up to 2 hotends / E-steppers. Comment out this line to continue."
31 | #endif
32 |
33 | #define BOARD_NAME "MKS BASE 1.0"
34 |
35 | //
36 | // Heaters / Fans
37 | //
38 | // Power outputs EFBF or EFBE
39 | #define MOSFET_D_PIN 7
40 |
41 | #define CASE_LIGHT_PIN 2
42 |
43 | //
44 | // M3/M4/M5 - Spindle/Laser Control
45 | //
46 | #define SPINDLE_LASER_PWM_PIN 2 // MUST BE HARDWARE PWM
47 | #define SPINDLE_LASER_ENABLE_PIN 15 // Pin should have a pullup!
48 | #define SPINDLE_DIR_PIN 19
49 |
50 | #include "pins_RAMPS.h"
51 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_3.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 4120 K, 4.7 kOhm pull-up, mendel-parts
24 | const short temptable_3[][2] PROGMEM = {
25 | { OV( 1), 864 },
26 | { OV( 21), 300 },
27 | { OV( 25), 290 },
28 | { OV( 29), 280 },
29 | { OV( 33), 270 },
30 | { OV( 39), 260 },
31 | { OV( 46), 250 },
32 | { OV( 54), 240 },
33 | { OV( 64), 230 },
34 | { OV( 75), 220 },
35 | { OV( 90), 210 },
36 | { OV( 107), 200 },
37 | { OV( 128), 190 },
38 | { OV( 154), 180 },
39 | { OV( 184), 170 },
40 | { OV( 221), 160 },
41 | { OV( 265), 150 },
42 | { OV( 316), 140 },
43 | { OV( 375), 130 },
44 | { OV( 441), 120 },
45 | { OV( 513), 110 },
46 | { OV( 588), 100 },
47 | { OV( 734), 80 },
48 | { OV( 856), 60 },
49 | { OV( 938), 40 },
50 | { OV( 986), 20 },
51 | { OV(1008), 0 },
52 | { OV(1018), -20 }
53 | };
54 |
--------------------------------------------------------------------------------
/Marlin/SdFile.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * \file
25 | * \brief SdFile class
26 | */
27 |
28 | /**
29 | * Arduino SdFat Library
30 | * Copyright (C) 2009 by William Greiman
31 | *
32 | * This file is part of the Arduino Sd2Card Library
33 | */
34 | #ifndef _SDFILE_H_
35 | #define _SDFILE_H_
36 |
37 | #include "SdBaseFile.h"
38 | #include
39 |
40 | /**
41 | * \class SdFile
42 | * \brief SdBaseFile with Print.
43 | */
44 | class SdFile : public SdBaseFile, public Print {
45 | public:
46 | SdFile() {}
47 | SdFile(const char* name, uint8_t oflag);
48 | #if ARDUINO >= 100
49 | size_t write(uint8_t b);
50 | #else
51 | void write(uint8_t b);
52 | #endif
53 |
54 | int16_t write(const void* buf, uint16_t nbyte);
55 | void write(const char* str);
56 | void write_P(PGM_P str);
57 | void writeln_P(PGM_P str);
58 | };
59 |
60 | #endif // _SDFILE_H_
61 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/Velleman/K8200/README.md:
--------------------------------------------------------------------------------
1 | # Example Configuration for Vellemann [K8200](http://www.k8200.eu/)
2 | * Configuration files for **Vellemann K8200** (with [VM8201](http://www.vellemanprojects.eu/products/view/?id=416158) - LCD Option for K8200)
3 | * K8200 is a 3Drag clone - configuration should work with 3Drag http://reprap.org/wiki/3drag, too. Please report.
4 |
5 | * updated manually with parameters from genuine Vellemann Firmware "firmware_k8200_marlinv2" based on the recent development branch
6 |
7 | * VM8201 uses "DISPLAY_CHARSET_HD44870 JAPANESE" and "ULTIMAKERCONTROLLER"
8 | * german (de) translation with umlaut is supported now - thanks to @AnHardt for the great hardware based umlaut support
9 |
10 | I [@CONSULitAS](https://github.com/CONSULitAS) tested the changes on my K8200 with 20x4-LCD and Arduino 1.6.12 for Mac (SD library added to IDE manually), 2016-11-18 - everything works well.
11 |
12 | **Source for genuine [Vellemann Firmware](http://www.k8200.eu/support/downloads/)**
13 | * V2.1.1 (for z axis upgrade, date branched: 2013-06-05): [firmware_k8200_v2.1.1.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_v2.1.1.zip)
14 | * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_v2.1.1.zip
15 |
16 | * V2 (with LCD/SD-Support, date branched: 2013-06-05): [firmware_k8200_marlinv2.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv2.zip)
17 | * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_marlinv2.zip
18 |
19 | * V1 (without LCD/SD-Support, date branched: 2012-10-02): [firmware_k8200_marlinv1.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv1.zip)
20 | * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_marlinv1.zip
21 |
--------------------------------------------------------------------------------
/Marlin/pins_MELZI_MALYAN.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Melzi (Malyan M150) pin assignments
25 | */
26 |
27 | #define BOARD_NAME "Melzi (Malyan)"
28 | #include "pins_MELZI.h"
29 |
30 | #undef LCD_SDSS
31 | #undef LCD_PINS_RS
32 | #undef LCD_PINS_ENABLE
33 | #undef LCD_PINS_D4
34 | #undef BTN_EN1
35 | #undef BTN_EN2
36 | #undef BTN_ENC
37 |
38 | #define LCD_PINS_RS 17 // ST9720 CS
39 | #define LCD_PINS_ENABLE 16 // ST9720 DAT
40 | #define LCD_PINS_D4 11 // ST9720 CLK
41 | #define BTN_EN1 30
42 | #define BTN_EN2 29
43 | #define BTN_ENC 28
44 |
45 | // Alter timing for graphical display
46 | #ifndef ST7920_DELAY_1
47 | #define ST7920_DELAY_1 DELAY_NS(125)
48 | #endif
49 | #ifndef ST7920_DELAY_2
50 | #define ST7920_DELAY_2 DELAY_NS(125)
51 | #endif
52 | #ifndef ST7920_DELAY_3
53 | #define ST7920_DELAY_3 DELAY_NS(125)
54 | #endif
55 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_66.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 2.5 MOhm, beta25 = 4500 K, 4.7 kOhm pull-up, DyzeDesign 500 °C Thermistor
24 | const short temptable_66[][2] PROGMEM = {
25 | { OV( 17.5), 850 },
26 | { OV( 17.9), 500 },
27 | { OV( 21.7), 480 },
28 | { OV( 26.6), 460 },
29 | { OV( 33.1), 440 },
30 | { OV( 41.0), 420 },
31 | { OV( 52.3), 400 },
32 | { OV( 67.7), 380 },
33 | { OV( 86.5), 360 },
34 | { OV( 112.0), 340 },
35 | { OV( 147.2), 320 },
36 | { OV( 194.0), 300 },
37 | { OV( 254.3), 280 },
38 | { OV( 330.2), 260 },
39 | { OV( 427.9), 240 },
40 | { OV( 533.4), 220 },
41 | { OV( 646.5), 200 },
42 | { OV( 754.4), 180 },
43 | { OV( 844.3), 160 },
44 | { OV( 911.7), 140 },
45 | { OV( 958.6), 120 },
46 | { OV( 988.8), 100 },
47 | { OV(1006.6), 80 },
48 | { OV(1015.8), 60 },
49 | { OV(1021.3), 30 },
50 | { OV(1023) - 1, 25},
51 | { OV( 1023), 20}
52 | };
53 |
--------------------------------------------------------------------------------
/Marlin/pins_MKS_BASE_15.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * MKS BASE v1.5 with A4982 stepper drivers and digital micro-stepping
25 | */
26 |
27 | #include "pins_MKS_BASE.h"
28 |
29 | /**
30 | * Microstepping pins
31 | */
32 | #define X_MS1_PIN 5 // Digital 3 / Pin 5 / PE3 / SERVO2_PIN
33 | #define X_MS2_PIN 6 // Digital 6 / Pin 14 / PH3 / SERVO1_PIN
34 | #define Y_MS1_PIN 59 // Analog 5 / Pin 92 / PF5
35 | #define Y_MS2_PIN 58 // Analog 4 / Pin 93 / PF4
36 | #define Z_MS1_PIN 22 // Digital 22 / Pin 78 / PA0
37 | #define Z_MS2_PIN 39 // Digital 39 / Pin 70 / PG2
38 | #define E0_MS1_PIN 63 // Analog 9 / Pin 86 / PK1
39 | #define E0_MS2_PIN 64 // Analog 10 / Pin 87 / PK2
40 | #define E1_MS1_PIN 57 // Analog 3 / Pin 93 / PF3
41 | #define E1_MS2_PIN 4 // Digital 4 / Pin 1 / PG5 / SERVO3_PIN
42 |
--------------------------------------------------------------------------------
/Marlin/pins_GEN6_DELUXE.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Gen6 Deluxe pin assignments
25 | */
26 |
27 | /**
28 | * Rev B 26 DEC 2016
29 | *
30 | * added pointer to a current Arduino IDE extension
31 | *
32 | */
33 |
34 | /**
35 | * A useable Arduino IDE extension (board manager) can be found at
36 | * https://github.com/Lauszus/Sanguino
37 | *
38 | * This extension has been tested on Arduino 1.6.12 & 1.8.0
39 | *
40 | * Here's the JSON path:
41 | * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42 | *
43 | * When installing select 1.0.2
44 | *
45 | * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46 | * Just use the above JSON URL instead of Sparkfun's JSON.
47 | *
48 | * Once installed select the SANGUINO board and then select the CPU.
49 | *
50 | */
51 |
52 |
53 | #define BOARD_NAME "Gen6 Deluxe"
54 |
55 | #include "pins_GEN6.h"
56 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_501.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // 100k Zonestar thermistor. Adjusted By Hally
24 | const short temptable_501[][2] PROGMEM = {
25 | {OV( 1), 713},
26 | {OV( 14), 300}, // Top rating 300C
27 | {OV( 16), 290},
28 | {OV( 19), 280},
29 | {OV( 23), 270},
30 | {OV( 27), 260},
31 | {OV( 31), 250},
32 | {OV( 37), 240},
33 | {OV( 47), 230},
34 | {OV( 57), 220},
35 | {OV( 68), 210},
36 | {OV( 84), 200},
37 | {OV( 100), 190},
38 | {OV( 128), 180},
39 | {OV( 155), 170},
40 | {OV( 189), 160},
41 | {OV( 230), 150},
42 | {OV( 278), 140},
43 | {OV( 336), 130},
44 | {OV( 402), 120},
45 | {OV( 476), 110},
46 | {OV( 554), 100},
47 | {OV( 635), 90},
48 | {OV( 713), 80},
49 | {OV( 784), 70},
50 | {OV( 846), 60},
51 | {OV( 897), 50},
52 | {OV( 937), 40},
53 | {OV( 966), 30},
54 | {OV( 986), 20},
55 | {OV(1000), 10},
56 | {OV(1010), 0}
57 | };
58 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_10.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 3960 K, 4.7 kOhm pull-up, RS thermistor 198-961
24 | const short temptable_10[][2] PROGMEM = {
25 | { OV( 1), 929 },
26 | { OV( 36), 299 },
27 | { OV( 71), 246 },
28 | { OV( 106), 217 },
29 | { OV( 141), 198 },
30 | { OV( 176), 184 },
31 | { OV( 211), 173 },
32 | { OV( 246), 163 },
33 | { OV( 281), 154 },
34 | { OV( 316), 147 },
35 | { OV( 351), 140 },
36 | { OV( 386), 134 },
37 | { OV( 421), 128 },
38 | { OV( 456), 122 },
39 | { OV( 491), 117 },
40 | { OV( 526), 112 },
41 | { OV( 561), 107 },
42 | { OV( 596), 102 },
43 | { OV( 631), 97 },
44 | { OV( 666), 91 },
45 | { OV( 701), 86 },
46 | { OV( 736), 81 },
47 | { OV( 771), 76 },
48 | { OV( 806), 70 },
49 | { OV( 841), 63 },
50 | { OV( 876), 56 },
51 | { OV( 911), 48 },
52 | { OV( 946), 38 },
53 | { OV( 981), 23 },
54 | { OV(1005), 5 },
55 | { OV(1016), 0 }
56 | };
57 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_9.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 3960 K, 4.7 kOhm pull-up, GE Sensing AL03006-58.2K-97-G1
24 | const short temptable_9[][2] PROGMEM = {
25 | { OV( 1), 936 },
26 | { OV( 36), 300 },
27 | { OV( 71), 246 },
28 | { OV( 106), 218 },
29 | { OV( 141), 199 },
30 | { OV( 176), 185 },
31 | { OV( 211), 173 },
32 | { OV( 246), 163 },
33 | { OV( 281), 155 },
34 | { OV( 316), 147 },
35 | { OV( 351), 140 },
36 | { OV( 386), 134 },
37 | { OV( 421), 128 },
38 | { OV( 456), 122 },
39 | { OV( 491), 117 },
40 | { OV( 526), 112 },
41 | { OV( 561), 107 },
42 | { OV( 596), 102 },
43 | { OV( 631), 97 },
44 | { OV( 666), 92 },
45 | { OV( 701), 87 },
46 | { OV( 736), 81 },
47 | { OV( 771), 76 },
48 | { OV( 806), 70 },
49 | { OV( 841), 63 },
50 | { OV( 876), 56 },
51 | { OV( 911), 48 },
52 | { OV( 946), 38 },
53 | { OV( 981), 23 },
54 | { OV(1005), 5 },
55 | { OV(1016), 0 }
56 | };
57 |
--------------------------------------------------------------------------------
/Marlin/pins_GEN7_13.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Gen7 v1.3 pin assignments
25 | */
26 |
27 | /**
28 | * Rev B 26 DEC 2016
29 | *
30 | * added pointer to a current Arduino IDE extension
31 | *
32 | */
33 |
34 | /**
35 | * A useable Arduino IDE extension (board manager) can be found at
36 | * https://github.com/Lauszus/Sanguino
37 | *
38 | * This extension has been tested on Arduino 1.6.12 & 1.8.0
39 | *
40 | * Here's the JSON path:
41 | * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42 | *
43 | * When installing select 1.0.2
44 | *
45 | * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46 | * Just use the above JSON URL instead of Sparkfun's JSON.
47 | *
48 | * Once installed select the Sanguino board and then select the CPU.
49 | *
50 | */
51 |
52 | #define BOARD_NAME "Gen7 v1.3"
53 |
54 | #define GEN7_VERSION 13 // v1.3
55 | #include "pins_GEN7_12.h"
56 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_12.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 4700 K, 4.7 kOhm pull-up, (personal calibration for Makibox hot bed)
24 | const short temptable_12[][2] PROGMEM = {
25 | { OV( 35), 180 }, // top rating 180C
26 | { OV( 211), 140 },
27 | { OV( 233), 135 },
28 | { OV( 261), 130 },
29 | { OV( 290), 125 },
30 | { OV( 328), 120 },
31 | { OV( 362), 115 },
32 | { OV( 406), 110 },
33 | { OV( 446), 105 },
34 | { OV( 496), 100 },
35 | { OV( 539), 95 },
36 | { OV( 585), 90 },
37 | { OV( 629), 85 },
38 | { OV( 675), 80 },
39 | { OV( 718), 75 },
40 | { OV( 758), 70 },
41 | { OV( 793), 65 },
42 | { OV( 822), 60 },
43 | { OV( 841), 55 },
44 | { OV( 875), 50 },
45 | { OV( 899), 45 },
46 | { OV( 926), 40 },
47 | { OV( 946), 35 },
48 | { OV( 962), 30 },
49 | { OV( 977), 25 },
50 | { OV( 987), 20 },
51 | { OV( 995), 15 },
52 | { OV(1001), 10 },
53 | { OV(1010), 0 },
54 | { OV(1023), -40 }
55 | };
56 |
--------------------------------------------------------------------------------
/Marlin/pins_FELIX2.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments
25 | */
26 |
27 | #if HOTENDS > 2 || E_STEPPERS > 2
28 | #error "Felix 2.0+ supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 | #endif
30 |
31 | #define BOARD_NAME "Felix 2.0+"
32 |
33 | //
34 | // Heaters / Fans
35 | //
36 | // Power outputs EFBF or EFBE
37 | #define MOSFET_D_PIN 7
38 |
39 | #include "pins_RAMPS.h"
40 |
41 | //
42 | // Misc. Functions
43 | //
44 | #undef SDPOWER
45 | #define SDPOWER 1
46 |
47 | #define PS_ON_PIN 12
48 |
49 | //
50 | // LCD / Controller
51 | //
52 | #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
53 |
54 | #define SD_DETECT_PIN 6
55 |
56 | #endif // NEWPANEL && ULTRA_LCD
57 |
58 | //
59 | // M3/M4/M5 - Spindle/Laser Control
60 | //
61 | #undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are not valid with this board
62 | #undef SPINDLE_LASER_ENABLE_PIN
63 | #undef SPINDLE_DIR_PIN
64 |
--------------------------------------------------------------------------------
/Marlin/pins_MELZI_TRONXY.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Melzi pin assignments
25 | */
26 |
27 | #define BOARD_NAME "Melzi (Tronxy)"
28 | #include "pins_MELZI.h"
29 |
30 | #undef Z_ENABLE_PIN
31 | #undef LCD_PINS_RS
32 | #undef LCD_PINS_ENABLE
33 | #undef LCD_PINS_D4
34 | #undef LCD_PINS_D5
35 | #undef LCD_PINS_D6
36 | #undef LCD_PINS_D7
37 | #undef BTN_EN1
38 | #undef BTN_EN2
39 | #undef BTN_ENC
40 | #undef LCD_SDSS
41 |
42 | #define Z_ENABLE_PIN 14
43 | #define LCD_PINS_RS 30
44 | #define LCD_PINS_ENABLE 28
45 | #define LCD_PINS_D4 16
46 | #define LCD_PINS_D5 17
47 | #define LCD_PINS_D6 27
48 | #define LCD_PINS_D7 29
49 | #define BTN_EN1 10
50 | #define BTN_EN2 11
51 | #define BTN_ENC 26
52 |
53 | #ifndef ST7920_DELAY_1
54 | #define ST7920_DELAY_1 DELAY_NS(0)
55 | #endif
56 | #ifndef ST7920_DELAY_2
57 | #define ST7920_DELAY_2 DELAY_NS(125)
58 | #endif
59 | #ifndef ST7920_DELAY_3
60 | #define ST7920_DELAY_3 DELAY_NS(0)
61 | #endif
62 |
--------------------------------------------------------------------------------
/Marlin/serial.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #include "serial.h"
24 |
25 | const char errormagic[] PROGMEM = "Error:";
26 | const char echomagic[] PROGMEM = "echo:";
27 |
28 | void serial_echopair_PGM(const char* s_P, const char *v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
29 | void serial_echopair_PGM(const char* s_P, char v) { serialprintPGM(s_P); SERIAL_CHAR(v); }
30 | void serial_echopair_PGM(const char* s_P, int v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
31 | void serial_echopair_PGM(const char* s_P, long v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
32 | void serial_echopair_PGM(const char* s_P, float v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
33 | void serial_echopair_PGM(const char* s_P, double v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
34 | void serial_echopair_PGM(const char* s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
35 |
36 | void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) SERIAL_CHAR(' '); }
37 |
--------------------------------------------------------------------------------
/Marlin/MarlinSPI.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #ifndef __MARLIN_SPI_H__
24 | #define __MARLIN_SPI_H__
25 |
26 | #include
27 | #include "softspi.h"
28 |
29 | template
30 | class SPI {
31 | static SoftSPI softSPI;
32 | public:
33 | FORCE_INLINE static void init() { softSPI.begin(); }
34 | FORCE_INLINE static void send(uint8_t data) { softSPI.send(data); }
35 | FORCE_INLINE static uint8_t receive() { return softSPI.receive(); }
36 | };
37 |
38 |
39 | // Hardware SPI
40 | template<>
41 | class SPI {
42 | public:
43 | FORCE_INLINE static void init() {
44 | OUT_WRITE(SCK_PIN, LOW);
45 | OUT_WRITE(MOSI_PIN, HIGH);
46 | SET_INPUT(MISO_PIN);
47 | WRITE(MISO_PIN, HIGH);
48 | }
49 | FORCE_INLINE static uint8_t receive() {
50 | SPDR = 0;
51 | while (!TEST(SPSR, SPIF)) { /* nada */ }
52 | return SPDR;
53 | }
54 |
55 | };
56 |
57 | #endif // __MARLIN_SPI_H__
58 |
--------------------------------------------------------------------------------
/Marlin/runout.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * runout.cpp - Runout sensor support
25 | */
26 |
27 | #include "MarlinConfig.h"
28 |
29 | #if ENABLED(FILAMENT_RUNOUT_SENSOR)
30 |
31 | #include "runout.h"
32 |
33 | FilamentRunoutSensor runout;
34 |
35 | bool FilamentRunoutSensor::filament_ran_out; // = false
36 | uint8_t FilamentRunoutSensor::runout_count; // = 0
37 |
38 | void FilamentRunoutSensor::setup() {
39 |
40 | #if ENABLED(FIL_RUNOUT_PULLUP)
41 | #define INIT_RUNOUT_PIN(P) SET_INPUT_PULLUP(P)
42 | #else
43 | #define INIT_RUNOUT_PIN(P) SET_INPUT(P)
44 | #endif
45 |
46 | INIT_RUNOUT_PIN(FIL_RUNOUT_PIN);
47 | #if NUM_RUNOUT_SENSORS > 1
48 | INIT_RUNOUT_PIN(FIL_RUNOUT2_PIN);
49 | #if NUM_RUNOUT_SENSORS > 2
50 | INIT_RUNOUT_PIN(FIL_RUNOUT3_PIN);
51 | #if NUM_RUNOUT_SENSORS > 3
52 | INIT_RUNOUT_PIN(FIL_RUNOUT4_PIN);
53 | #if NUM_RUNOUT_SENSORS > 4
54 | INIT_RUNOUT_PIN(FIL_RUNOUT5_PIN);
55 | #endif
56 | #endif
57 | #endif
58 | #endif
59 | }
60 |
61 | #endif // FILAMENT_RUNOUT_SENSOR
62 |
--------------------------------------------------------------------------------
/Marlin/pins_RIGIDBOARD_V2.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * RIGIDBOARD V2 Arduino Mega with RAMPS v1.4 pin assignments
25 | */
26 |
27 | #include "pins_RIGIDBOARD.h"
28 |
29 | #undef BOARD_NAME
30 | #define BOARD_NAME "RigidBoard V2"
31 |
32 | //
33 | // Steppers
34 | //
35 |
36 | // I2C based DAC like on the Printrboard REVF
37 | #define DAC_STEPPER_CURRENT
38 |
39 | // Channels available for DAC, For Rigidboard there are 4
40 | #define DAC_STEPPER_ORDER { 0, 1, 2, 3 }
41 |
42 | #define DAC_STEPPER_SENSE 0.05 // sense resistors on rigidboard stepper chips are .05 value
43 | #define DAC_STEPPER_ADDRESS 0
44 | #define DAC_STEPPER_MAX 4096 // was 5000 but max allowable value is actually 4096
45 | #define DAC_STEPPER_VREF 1 // internal Vref, gain 2x = 4.096V
46 | #define DAC_STEPPER_GAIN 1 // value of 1 here sets gain of 2
47 | #define DAC_DISABLE_PIN 42 // set low to enable DAC
48 | #define DAC_OR_ADDRESS 0x01
49 |
50 | #ifndef DAC_MOTOR_CURRENT_DEFAULT
51 | #define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
52 | #endif
53 |
--------------------------------------------------------------------------------
/Marlin/point_t.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #ifndef __POINT_T__
24 | #define __POINT_T__
25 |
26 | /**
27 | * @brief Cartesian Point
28 | * @details Represents a three dimensional point on Cartesian coordinate system,
29 | * using an additional fourth dimension for the extrusion length.
30 | *
31 | * @param x The x-coordinate of the point.
32 | * @param y The y-coordinate of the point.
33 | * @param z The z-coordinate of the point.
34 | */
35 | struct point_t {
36 | float x, y, z;
37 |
38 | /**
39 | * @brief Three dimensional point constructor
40 | *
41 | * @param x The x-coordinate of the point.
42 | * @param y The y-coordinate of the point.
43 | * @param z The z-coordinate of the point.
44 | */
45 | point_t(const float x, const float y, const float z) : x(x), y(y), z(z) {}
46 |
47 | /**
48 | * @brief Two dimensional point constructor
49 | *
50 | * @param x The x-coordinate of the point.
51 | * @param y The y-coordinate of the point.
52 | */
53 | point_t(const float x, const float y) : point_t(x, y, NAN) {}
54 |
55 | };
56 |
57 | #endif // __POINT_T__
58 |
--------------------------------------------------------------------------------
/Marlin/pins_K8400.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Velleman K8400 (Vertex)
25 | * 3DRAG clone
26 | *
27 | * K8400 has some minor differences over a normal 3Drag:
28 | * - No X/Y max endstops
29 | * - Second extruder step pin has moved
30 | * - No power supply control
31 | * - Second heater has moved pin
32 | */
33 |
34 | #define BOARD_NAME "K8400"
35 | #define DEFAULT_MACHINE_NAME "Vertex"
36 | #define DEFAULT_SOURCE_CODE_URL "https://github.com/birkett/Vertex-K8400-Firmware"
37 |
38 | #include "pins_3DRAG.h"
39 |
40 | //
41 | // Limit Switches
42 | //
43 | #define X_STOP_PIN 3
44 | #define Y_STOP_PIN 14
45 |
46 | #undef X_MIN_PIN
47 | #undef X_MAX_PIN
48 | #undef Y_MIN_PIN
49 | #undef Y_MAX_PIN
50 |
51 | //
52 | // Steppers
53 | //
54 | #undef E1_STEP_PIN
55 | #define E1_STEP_PIN 32
56 |
57 | //
58 | // Heaters / Fans
59 | //
60 | #undef HEATER_1_PIN
61 | #define HEATER_1_PIN 11
62 |
63 | //
64 | // Misc. Functions
65 | //
66 | #undef PS_ON_PIN
67 | #undef KILL_PIN
68 | #undef SD_DETECT_PIN
69 |
70 | #if Z_STEP_PIN == 26
71 | #undef Z_STEP_PIN
72 | #define Z_STEP_PIN 32
73 | #endif
74 |
--------------------------------------------------------------------------------
/Marlin/dogm_font_data_Marlin_symbols.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | Fontname: Marlin_symbols
25 | Copyright: Created with Fony 1.4.7
26 | Capital A Height: 0, '1' Height: 0
27 | Calculated Max Values w= 5 h=10 x= 0 y= 3 dx= 6 dy= 0 ascent= 8 len=10
28 | Font Bounding box w= 6 h= 9 x= 0 y=-2
29 | Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
30 | Pure Font ascent = 0 descent= 0
31 | X Font ascent = 0 descent= 0
32 | Max Font ascent = 8 descent=-2
33 | */
34 | #include
35 | const u8g_fntpgm_uint8_t Marlin_symbols[140] U8G_SECTION(".progmem.Marlin_symbols") = {
36 | 0, 6, 9, 0, 254, 0, 0, 0, 0, 0, 1, 9, 0, 8, 254, 0,
37 | 0, 5, 8, 8, 6, 0, 0, 64, 240, 200, 136, 136, 152, 120, 16, 5,
38 | 8, 8, 6, 0, 0, 192, 248, 136, 136, 136, 136, 136, 248, 5, 5, 5,
39 | 6, 0, 1, 32, 48, 248, 48, 32, 5, 8, 8, 6, 0, 0, 32, 112,
40 | 248, 32, 32, 32, 32, 224, 5, 9, 9, 6, 0, 255, 32, 112, 168, 168,
41 | 184, 136, 136, 112, 32, 5, 9, 9, 6, 0, 255, 224, 128, 192, 176, 168,
42 | 40, 48, 40, 40, 5, 9, 9, 6, 0, 255, 248, 168, 136, 136, 136, 136,
43 | 136, 168, 248, 5, 10, 10, 6, 0, 254, 32, 80, 80, 80, 80, 136, 168,
44 | 168, 136, 112, 3, 3, 3, 6, 0, 3, 64, 160, 64
45 | };
46 |
--------------------------------------------------------------------------------
/Marlin/neopixel.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * neopixel.cpp
25 | */
26 |
27 | #include "MarlinConfig.h"
28 |
29 | #if ENABLED(NEOPIXEL_LED)
30 |
31 | #include "neopixel.h"
32 |
33 | #if ENABLED(NEOPIXEL_STARTUP_TEST)
34 | #include "utility.h"
35 | #endif
36 |
37 | Adafruit_NeoPixel pixels(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800);
38 |
39 | void set_neopixel_color(const uint32_t color) {
40 | for (uint16_t i = 0; i < pixels.numPixels(); ++i)
41 | pixels.setPixelColor(i, color);
42 | pixels.show();
43 | }
44 |
45 | void setup_neopixel() {
46 | SET_OUTPUT(NEOPIXEL_PIN);
47 | pixels.setBrightness(NEOPIXEL_BRIGHTNESS); // 0 - 255 range
48 | pixels.begin();
49 | pixels.show(); // initialize to all off
50 |
51 | #if ENABLED(NEOPIXEL_STARTUP_TEST)
52 | safe_delay(1000);
53 | set_neopixel_color(pixels.Color(255, 0, 0, 0)); // red
54 | safe_delay(1000);
55 | set_neopixel_color(pixels.Color(0, 255, 0, 0)); // green
56 | safe_delay(1000);
57 | set_neopixel_color(pixels.Color(0, 0, 255, 0)); // blue
58 | safe_delay(1000);
59 | #endif
60 | set_neopixel_color(pixels.Color(NEO_WHITE)); // white
61 | }
62 |
63 | #endif // NEOPIXEL_LED
64 |
65 |
--------------------------------------------------------------------------------
/Marlin/hex_print_routines.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #include "MarlinConfig.h"
24 | #include "parser.h"
25 |
26 | #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER)
27 |
28 | #include "Marlin.h"
29 | #include "hex_print_routines.h"
30 |
31 | static char _hex[7] = "0x0000";
32 |
33 | char* hex_byte(const uint8_t b) {
34 | _hex[4] = hex_nybble(b >> 4);
35 | _hex[5] = hex_nybble(b);
36 | return &_hex[4];
37 | }
38 |
39 | char* hex_word(const uint16_t w) {
40 | _hex[2] = hex_nybble(w >> 12);
41 | _hex[3] = hex_nybble(w >> 8);
42 | _hex[4] = hex_nybble(w >> 4);
43 | _hex[5] = hex_nybble(w);
44 | return &_hex[2];
45 | }
46 |
47 | char* hex_address(const void * const w) {
48 | (void)hex_word((uint16_t)w);
49 | return _hex;
50 | }
51 |
52 | void print_hex_nybble(const uint8_t n) { SERIAL_CHAR(hex_nybble(n)); }
53 | void print_hex_byte(const uint8_t b) { SERIAL_ECHO(hex_byte(b)); }
54 | void print_hex_word(const uint16_t w) { SERIAL_ECHO(hex_word(w)); }
55 | void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); }
56 |
57 | #endif // AUTO_BED_LEVELING_UBL || M100_FREE_MEMORY_WATCHER || DEBUG_GCODE_PARSER
58 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_2.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | //
24 | // R25 = 200 kOhm, beta25 = 4338 K, 4.7 kOhm pull-up, ATC Semitec 204GT-2
25 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
26 | // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance
27 | //
28 | const short temptable_2[][2] PROGMEM = {
29 | { OV( 1), 848 },
30 | { OV( 30), 300 }, // top rating 300C
31 | { OV( 34), 290 },
32 | { OV( 39), 280 },
33 | { OV( 46), 270 },
34 | { OV( 53), 260 },
35 | { OV( 63), 250 },
36 | { OV( 74), 240 },
37 | { OV( 87), 230 },
38 | { OV( 104), 220 },
39 | { OV( 124), 210 },
40 | { OV( 148), 200 },
41 | { OV( 176), 190 },
42 | { OV( 211), 180 },
43 | { OV( 252), 170 },
44 | { OV( 301), 160 },
45 | { OV( 357), 150 },
46 | { OV( 420), 140 },
47 | { OV( 489), 130 },
48 | { OV( 562), 120 },
49 | { OV( 636), 110 },
50 | { OV( 708), 100 },
51 | { OV( 775), 90 },
52 | { OV( 835), 80 },
53 | { OV( 884), 70 },
54 | { OV( 924), 60 },
55 | { OV( 955), 50 },
56 | { OV( 977), 40 },
57 | { OV( 993), 30 },
58 | { OV(1004), 20 },
59 | { OV(1012), 10 },
60 | { OV(1016), 0 }
61 | };
62 |
--------------------------------------------------------------------------------
/Marlin/Marlin.ino:
--------------------------------------------------------------------------------
1 | /*
2 | ================================================================================
3 |
4 | Marlin Firmware
5 |
6 | (c) 2011-2018 MarlinFirmware
7 | Portions of Marlin are (c) by their respective authors.
8 | All code complies with GPLv2 and/or GPLv3
9 |
10 | ================================================================================
11 |
12 | Greetings! Thank you for choosing Marlin as your 3D printer firmware.
13 |
14 | To configure Marlin you must edit Configuration.h and Configuration_adv.h
15 | located in the root 'Marlin' folder. Check the example_configurations folder to
16 | see if there's a more suitable starting-point for your specific hardware.
17 |
18 | Before diving in, we recommend the following essential links:
19 |
20 | Marlin Firmware Official Website
21 |
22 | - http://marlinfw.org/
23 | The official Marlin Firmware website contains the most up-to-date
24 | documentation. Contributions are always welcome!
25 |
26 | Configuration
27 |
28 | - https://www.youtube.com/watch?v=3gwWVFtdg-4
29 | A good 20-minute overview of Marlin configuration by Tom Sanladerer.
30 | (Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
31 | Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin
32 |
33 | - http://marlinfw.org/docs/configuration/configuration.html
34 | Marlin's configuration options are explained in more detail here.
35 |
36 | Getting Help
37 |
38 | - http://forums.reprap.org/list.php?415
39 | The Marlin Discussion Forum is a great place to get help from other Marlin
40 | users who may have experienced similar issues to your own.
41 |
42 | - https://github.com/MarlinFirmware/Marlin/issues
43 | With a free GitHub account you can provide us with feedback, bug reports,
44 | and feature requests via the Marlin Issue Queue.
45 |
46 | Contributing
47 |
48 | - http://marlinfw.org/docs/development/contributing.html
49 | If you'd like to contribute to Marlin, read this first!
50 |
51 | - http://marlinfw.org/docs/development/coding_standards.html
52 | Before submitting code get to know the Coding Standards.
53 | */
54 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_6.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 4092 K, 8.2 kOhm pull-up, 100k Epcos (?) thermistor
24 | const short temptable_6[][2] PROGMEM = {
25 | { OV( 1), 350 },
26 | { OV( 28), 250 }, // top rating 250C
27 | { OV( 31), 245 },
28 | { OV( 35), 240 },
29 | { OV( 39), 235 },
30 | { OV( 42), 230 },
31 | { OV( 44), 225 },
32 | { OV( 49), 220 },
33 | { OV( 53), 215 },
34 | { OV( 62), 210 },
35 | { OV( 71), 205 }, // fitted graphically
36 | { OV( 78), 200 }, // fitted graphically
37 | { OV( 94), 190 },
38 | { OV( 102), 185 },
39 | { OV( 116), 170 },
40 | { OV( 143), 160 },
41 | { OV( 183), 150 },
42 | { OV( 223), 140 },
43 | { OV( 270), 130 },
44 | { OV( 318), 120 },
45 | { OV( 383), 110 },
46 | { OV( 413), 105 },
47 | { OV( 439), 100 },
48 | { OV( 484), 95 },
49 | { OV( 513), 90 },
50 | { OV( 607), 80 },
51 | { OV( 664), 70 },
52 | { OV( 781), 60 },
53 | { OV( 810), 55 },
54 | { OV( 849), 50 },
55 | { OV( 914), 45 },
56 | { OV( 914), 40 },
57 | { OV( 935), 35 },
58 | { OV( 954), 30 },
59 | { OV( 970), 25 },
60 | { OV( 978), 22 },
61 | { OV(1008), 3 },
62 | { OV(1023), 0 } // to allow internal 0 degrees C
63 | };
64 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/Felix/README.md:
--------------------------------------------------------------------------------
1 | # Felix 2.0/3.0 Configuration for Marlin Firmware
2 |
3 | Bringing silky smooth prints to Felix.
4 |
5 | ## Build HOWTO
6 |
7 | - Install the latest non-beta Arduino software IDE/toolset: http://www.arduino.cc/en/Main/Software
8 | - Download the Marlin firmware
9 | - [Latest developement version](https://github.com/MarlinFirmware/Marlin/tree/Development)
10 | - [Stable version](https://github.com/MarlinFirmware/Marlin/tree/Development)
11 | - In both cases use the "Download Zip" button on the right.
12 |
13 | ```
14 | cd Marlin/Marlin
15 | cp example_configurations/Felix/Configuration_adv.h .
16 | ```
17 |
18 | The next step depends on your setup:
19 |
20 | ### Single Extruder Configuration
21 |
22 | cp example_configurations/Felix/Configuration.h .
23 |
24 | ### Dual Extruder Configuration
25 |
26 | cp example_configurations/Felix/DUAL/Configuration.h Configuration.h
27 |
28 | ### Compile Firmware
29 |
30 | - Start the Arduino IDE.
31 | - Select Tools -> Board -> Arduino Mega 2560
32 | - Select the correct serial port in Tools -> Serial Port (usually /dev/ttyUSB0)
33 | - Open Marlin.pde or .ino
34 | - Click the Verify/Compile button
35 |
36 | ### Flash Firmware
37 |
38 | #### Connected directly via USB
39 |
40 | - Click the Upload button. If all goes well the firmware is uploading
41 |
42 | #### Remote update
43 |
44 | Find the latest Arduino build:
45 |
46 | ls -altr /tmp/
47 | drwxr-xr-x 5 chrono users 12288 Mar 3 21:41 build6072035599686630843.tmp
48 |
49 | Copy the firmware to your printer host:
50 |
51 | scp /tmp/build6072035599686630843.tmp/Marlin.cpp.hex a.b.c.d:/tmp/
52 |
53 | Connect to your printer host via ssh, stop Octoprint or any other service that may block your USB device and make sure you have avrdude installed, then run:
54 |
55 | avrdude -C/etc/avrdude.conf -v -v -v -patmega2560 -cwiring -P/dev/ttyUSB0 \
56 | -b115200 -D -Uflash:w:/tmp/Marlin.cpp.hex:i
57 |
58 | ## Acknowledgements
59 |
60 | Mashed together and tested on https://apollo.open-resource.org/mission:resources:picoprint based on collaborative teamwork of @andrewsil1 and @thinkyhead.
61 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_15.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // 100k bed thermistor in JGAurora A5. Calibrated by Sam Pinches 21st Jan 2018 using cheap k-type thermocouple inserted into heater block, using TM-902C meter.
24 | const short temptable_15[][2] PROGMEM = {
25 | { OV( 31), 275 },
26 | { OV( 33), 270 },
27 | { OV( 35), 260 },
28 | { OV( 38), 253 },
29 | { OV( 41), 248 },
30 | { OV( 48), 239 },
31 | { OV( 56), 232 },
32 | { OV( 66), 222 },
33 | { OV( 78), 212 },
34 | { OV( 93), 206 },
35 | { OV( 106), 199 },
36 | { OV( 118), 191 },
37 | { OV( 130), 186 },
38 | { OV( 158), 176 },
39 | { OV( 187), 167 },
40 | { OV( 224), 158 },
41 | { OV( 270), 148 },
42 | { OV( 321), 137 },
43 | { OV( 379), 127 },
44 | { OV( 446), 117 },
45 | { OV( 518), 106 },
46 | { OV( 593), 96 },
47 | { OV( 668), 86 },
48 | { OV( 739), 76 },
49 | { OV( 767), 72 },
50 | { OV( 830), 62 },
51 | { OV( 902), 48 },
52 | { OV( 926), 45 },
53 | { OV( 955), 35 },
54 | { OV( 966), 30 },
55 | { OV( 977), 25 },
56 | { OV( 985), 20 },
57 | { OV( 993), 15 },
58 | { OV( 999), 10 },
59 | { OV(1004), 5 },
60 | { OV(1008), 0 },
61 | { OV(1012), -5 },
62 | { OV(1016), -10 },
63 | { OV(1020), -15 }
64 | };
65 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_5.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 4267 K, 4.7 kOhm pull-up
24 | // 100k ParCan thermistor (104GT-2)
25 | // ATC Semitec 104GT-2 (Used in ParCan)
26 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
27 | // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance
28 | const short temptable_5[][2] PROGMEM = {
29 | { OV( 1), 713 },
30 | { OV( 17), 300 }, // top rating 300C
31 | { OV( 20), 290 },
32 | { OV( 23), 280 },
33 | { OV( 27), 270 },
34 | { OV( 31), 260 },
35 | { OV( 37), 250 },
36 | { OV( 43), 240 },
37 | { OV( 51), 230 },
38 | { OV( 61), 220 },
39 | { OV( 73), 210 },
40 | { OV( 87), 200 },
41 | { OV( 106), 190 },
42 | { OV( 128), 180 },
43 | { OV( 155), 170 },
44 | { OV( 189), 160 },
45 | { OV( 230), 150 },
46 | { OV( 278), 140 },
47 | { OV( 336), 130 },
48 | { OV( 402), 120 },
49 | { OV( 476), 110 },
50 | { OV( 554), 100 },
51 | { OV( 635), 90 },
52 | { OV( 713), 80 },
53 | { OV( 784), 70 },
54 | { OV( 846), 60 },
55 | { OV( 897), 50 },
56 | { OV( 937), 40 },
57 | { OV( 966), 30 },
58 | { OV( 986), 20 },
59 | { OV(1000), 10 },
60 | { OV(1010), 0 }
61 | };
62 |
--------------------------------------------------------------------------------
/Marlin/stepper_dac.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | stepper_dac.h - To set stepper current via DAC
25 |
26 | Part of Marlin
27 |
28 | Copyright (c) 2016 MarlinFirmware
29 |
30 | Marlin is free software: you can redistribute it and/or modify
31 | it under the terms of the GNU General Public License as published by
32 | the Free Software Foundation, either version 3 of the License, or
33 | (at your option) any later version.
34 |
35 | Marlin is distributed in the hope that it will be useful,
36 | but WITHOUT ANY WARRANTY; without even the implied warranty of
37 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 | GNU General Public License for more details.
39 |
40 | You should have received a copy of the GNU General Public License
41 | along with Marlin. If not, see .
42 | */
43 |
44 | #ifndef STEPPER_DAC_H
45 | #define STEPPER_DAC_H
46 |
47 | #include "dac_mcp4728.h"
48 |
49 | int dac_init();
50 | void dac_current_percent(uint8_t channel, float val);
51 | void dac_current_raw(uint8_t channel, uint16_t val);
52 | void dac_print_values();
53 | void dac_commit_eeprom();
54 | uint8_t dac_current_get_percent(const AxisEnum axis);
55 | void dac_current_set_percents(const uint8_t pct[XYZE]);
56 |
57 | #endif // STEPPER_DAC_H
58 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_52.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 200 kOhm, beta25 = 4338 K, 1 kOhm pull-up,
24 | // 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
25 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
26 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
27 | // Advantage: More resolution and better linearity from 150C to 200C
28 | const short temptable_52[][2] PROGMEM = {
29 | { OV( 1), 500 },
30 | { OV( 125), 300 }, // top rating 300C
31 | { OV( 142), 290 },
32 | { OV( 162), 280 },
33 | { OV( 185), 270 },
34 | { OV( 211), 260 },
35 | { OV( 240), 250 },
36 | { OV( 274), 240 },
37 | { OV( 312), 230 },
38 | { OV( 355), 220 },
39 | { OV( 401), 210 },
40 | { OV( 452), 200 },
41 | { OV( 506), 190 },
42 | { OV( 563), 180 },
43 | { OV( 620), 170 },
44 | { OV( 677), 160 },
45 | { OV( 732), 150 },
46 | { OV( 783), 140 },
47 | { OV( 830), 130 },
48 | { OV( 871), 120 },
49 | { OV( 906), 110 },
50 | { OV( 935), 100 },
51 | { OV( 958), 90 },
52 | { OV( 976), 80 },
53 | { OV( 990), 70 },
54 | { OV(1000), 60 },
55 | { OV(1008), 50 },
56 | { OV(1013), 40 },
57 | { OV(1017), 30 },
58 | { OV(1019), 20 },
59 | { OV(1021), 10 },
60 | { OV(1022), 0 }
61 | };
62 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_55.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 4267 K, 1 kOhm pull-up,
24 | // 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
25 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
26 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
27 | // Advantage: More resolution and better linearity from 150C to 200C
28 | const short temptable_55[][2] PROGMEM = {
29 | { OV( 1), 500 },
30 | { OV( 76), 300 },
31 | { OV( 87), 290 },
32 | { OV( 100), 280 },
33 | { OV( 114), 270 },
34 | { OV( 131), 260 },
35 | { OV( 152), 250 },
36 | { OV( 175), 240 },
37 | { OV( 202), 230 },
38 | { OV( 234), 220 },
39 | { OV( 271), 210 },
40 | { OV( 312), 200 },
41 | { OV( 359), 190 },
42 | { OV( 411), 180 },
43 | { OV( 467), 170 },
44 | { OV( 527), 160 },
45 | { OV( 590), 150 },
46 | { OV( 652), 140 },
47 | { OV( 713), 130 },
48 | { OV( 770), 120 },
49 | { OV( 822), 110 },
50 | { OV( 867), 100 },
51 | { OV( 905), 90 },
52 | { OV( 936), 80 },
53 | { OV( 961), 70 },
54 | { OV( 979), 60 },
55 | { OV( 993), 50 },
56 | { OV(1003), 40 },
57 | { OV(1010), 30 },
58 | { OV(1015), 20 },
59 | { OV(1018), 10 },
60 | { OV(1020), 0 }
61 | };
62 |
--------------------------------------------------------------------------------
/Marlin/mesh_bed_leveling.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #include "MarlinConfig.h"
24 |
25 | #if ENABLED(MESH_BED_LEVELING)
26 |
27 | #include "mesh_bed_leveling.h"
28 | #include "Marlin.h"
29 | #include "serial.h"
30 |
31 | mesh_bed_leveling mbl;
32 |
33 | float mesh_bed_leveling::z_offset,
34 | mesh_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y],
35 | mesh_bed_leveling::index_to_xpos[GRID_MAX_POINTS_X],
36 | mesh_bed_leveling::index_to_ypos[GRID_MAX_POINTS_Y];
37 |
38 | mesh_bed_leveling::mesh_bed_leveling() {
39 | for (uint8_t i = 0; i < GRID_MAX_POINTS_X; ++i)
40 | index_to_xpos[i] = MESH_MIN_X + i * (MESH_X_DIST);
41 | for (uint8_t i = 0; i < GRID_MAX_POINTS_Y; ++i)
42 | index_to_ypos[i] = MESH_MIN_Y + i * (MESH_Y_DIST);
43 | reset();
44 | }
45 |
46 | void mesh_bed_leveling::reset() {
47 | z_offset = 0;
48 | ZERO(z_values);
49 | }
50 |
51 | void mesh_bed_leveling::report_mesh() {
52 | SERIAL_PROTOCOLLNPGM("Num X,Y: " STRINGIFY(GRID_MAX_POINTS_X) "," STRINGIFY(GRID_MAX_POINTS_Y));
53 | SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(z_offset, 5);
54 | SERIAL_PROTOCOLLNPGM("\nMeasured points:");
55 | print_2d_array(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y, 5,
56 | [](const uint8_t ix, const uint8_t iy) { return z_values[ix][iy]; }
57 | );
58 | }
59 |
60 | #endif // MESH_BED_LEVELING
61 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_11.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 3950 K, 4.7 kOhm pull-up, QU-BD silicone bed QWG-104F-3950 thermistor
24 | const short temptable_11[][2] PROGMEM = {
25 | { OV( 1), 938 },
26 | { OV( 31), 314 },
27 | { OV( 41), 290 },
28 | { OV( 51), 272 },
29 | { OV( 61), 258 },
30 | { OV( 71), 247 },
31 | { OV( 81), 237 },
32 | { OV( 91), 229 },
33 | { OV( 101), 221 },
34 | { OV( 111), 215 },
35 | { OV( 121), 209 },
36 | { OV( 131), 204 },
37 | { OV( 141), 199 },
38 | { OV( 151), 195 },
39 | { OV( 161), 190 },
40 | { OV( 171), 187 },
41 | { OV( 181), 183 },
42 | { OV( 191), 179 },
43 | { OV( 201), 176 },
44 | { OV( 221), 170 },
45 | { OV( 241), 165 },
46 | { OV( 261), 160 },
47 | { OV( 281), 155 },
48 | { OV( 301), 150 },
49 | { OV( 331), 144 },
50 | { OV( 361), 139 },
51 | { OV( 391), 133 },
52 | { OV( 421), 128 },
53 | { OV( 451), 123 },
54 | { OV( 491), 117 },
55 | { OV( 531), 111 },
56 | { OV( 571), 105 },
57 | { OV( 611), 100 },
58 | { OV( 641), 95 },
59 | { OV( 681), 90 },
60 | { OV( 711), 85 },
61 | { OV( 751), 79 },
62 | { OV( 791), 72 },
63 | { OV( 811), 69 },
64 | { OV( 831), 65 },
65 | { OV( 871), 57 },
66 | { OV( 881), 55 },
67 | { OV( 901), 51 },
68 | { OV( 921), 45 },
69 | { OV( 941), 39 },
70 | { OV( 971), 28 },
71 | { OV( 981), 23 },
72 | { OV( 991), 17 },
73 | { OV(1001), 9 },
74 | { OV(1021), -27 }
75 | };
76 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/Malyan/M150/README.md:
--------------------------------------------------------------------------------
1 | # Configuration for Malyan M150 HobbyKing printer
2 |
3 | Config without automatic bed level sensor, or in other words, "as stock"
4 |
5 | ## To install:
6 |
7 | 1. Install [Arduino](https://www.arduino.cc/en/Main/Software)
8 |
9 | 1. Install U8glib
10 | * `Sketch` -> `Include Library` -> `Manage Libraries...`
11 | * Search for and install `U8glib` by oliver
12 |
13 | 1. Install Sanguino
14 | * `File` -> `Preferences`
15 | * Add
16 | `https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json`
17 | to `Additional Boards Manager URLs`
18 |
19 | 1. Modify Sanguino `boards.txt`
20 | * Close Arduino
21 | * Locate Arduino15 folder
22 | - `C:\Users\\AppData\Local\Arduino15` for Windows
23 | - `~/.arduino15` for Linux
24 |
25 | * Locate `boards.txt` in `packages/Sanguino/hardware/avr/1.0.2`
26 | (version number may change)
27 | * Add the following to the end of `boards.txt`
28 | (note that it is the same as sanguino.menu.cpu.atmega1284p but with
29 | a different name and upload speed)
30 |
31 | ## Malyan M150 W/ ATmega1284P 16MHz
32 | sanguino.menu.cpu.malyan_m150=Malyan M150
33 | sanguino.menu.cpu.malyan_m150.upload.maximum_size=130048
34 | sanguino.menu.cpu.malyan_m150.upload.maximum_data_size=16384
35 | sanguino.menu.cpu.malyan_m150.upload.speed=57600
36 | sanguino.menu.cpu.malyan_m150.bootloader.file=optiboot/optiboot_atmega1284p.hex
37 | sanguino.menu.cpu.malyan_m150.build.mcu=atmega1284p
38 | sanguino.menu.cpu.malyan_m150.build.f_cpu=16000000L
39 |
40 | 1. Configure Marlin
41 | * Copy `_Bootscreen.h`, `Configuration.h`, and `Configuration_adv.h`
42 | from `Marlin/example_configurations/Malyan/M150` to `Marlin`
43 | (overwrite files)
44 | * Read `Configuration.h` and make any necessary changes
45 |
46 | 1. Flash Marlin
47 | * Turn on printer while pressing scroll wheel button
48 | * Plug printer in to computer with USB cable
49 | * Open `Marlin/Marlin.ino` with Arduino
50 | * Configure Arduino
51 | - `Tools` -> `Board` -> `Sanguino`
52 | - `Tools` -> `Processor` -> `Malyan M150`
53 | - `Tools` -> `Port` -> Select your port
54 |
55 | * `Sketch` -> `Upload` or click arrow in top right corner
56 |
--------------------------------------------------------------------------------
/Marlin/dac_mcp4728.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Arduino library for MicroChip MCP4728 I2C D/A converter.
25 | */
26 |
27 | #ifndef DAC_MCP4728_H
28 | #define DAC_MCP4728_H
29 |
30 | #include "MarlinConfig.h"
31 |
32 | #if ENABLED(DAC_STEPPER_CURRENT)
33 | #include "Wire.h"
34 |
35 | #define defaultVDD DAC_STEPPER_MAX //was 5000 but differs with internal Vref
36 | #define BASE_ADDR 0x60
37 | #define RESET 0B00000110
38 | #define WAKE 0B00001001
39 | #define UPDATE 0B00001000
40 | #define MULTIWRITE 0B01000000
41 | #define SINGLEWRITE 0B01011000
42 | #define SEQWRITE 0B01010000
43 | #define VREFWRITE 0B10000000
44 | #define GAINWRITE 0B11000000
45 | #define POWERDOWNWRITE 0B10100000
46 | #define GENERALCALL 0B00000000
47 | #define GAINWRITE 0B11000000
48 |
49 | // This is taken from the original lib, makes it easy to edit if needed
50 | // DAC_OR_ADDRESS defined in pins_BOARD.h file
51 | #define DAC_DEV_ADDRESS (BASE_ADDR | DAC_OR_ADDRESS)
52 |
53 |
54 | void mcp4728_init();
55 | uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value);
56 | uint8_t mcp4728_eepromWrite();
57 | uint8_t mcp4728_setVref_all(uint8_t value);
58 | uint8_t mcp4728_setGain_all(uint8_t value);
59 | uint16_t mcp4728_getValue(uint8_t channel);
60 | uint8_t mcp4728_fastWrite();
61 | uint8_t mcp4728_simpleCommand(byte simpleCommand);
62 | uint8_t mcp4728_getDrvPct(uint8_t channel);
63 | void mcp4728_setDrvPct(uint8_t pct[XYZE]);
64 |
65 | #endif
66 | #endif // DAC_MCP4728_H
67 |
--------------------------------------------------------------------------------
/Marlin/delay.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * AVR busy wait delay Cycles routines:
25 | *
26 | * DELAY_CYCLES(count): Delay execution in cycles
27 | * DELAY_NS(count): Delay execution in nanoseconds
28 | * DELAY_US(count): Delay execution in microseconds
29 | */
30 |
31 | #ifndef MARLIN_DELAY_H
32 | #define MARLIN_DELAY_H
33 |
34 | #define nop() __asm__ __volatile__("nop;\n\t":::)
35 |
36 | FORCE_INLINE static void __delay_4cycles(uint8_t cy) {
37 | __asm__ __volatile__(
38 | L("1")
39 | A("dec %[cnt]")
40 | A("nop")
41 | A("brne 1b")
42 | : [cnt] "+r"(cy) // output: +r means input+output
43 | : // input:
44 | : "cc" // clobbers:
45 | );
46 | }
47 |
48 | /* ---------------- Delay in cycles */
49 | FORCE_INLINE static void DELAY_CYCLES(uint16_t x) {
50 |
51 | if (__builtin_constant_p(x)) {
52 | #define MAXNOPS 4
53 |
54 | if (x <= (MAXNOPS)) {
55 | switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); }
56 | }
57 | else {
58 | const uint32_t rem = (x) % (MAXNOPS);
59 | switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); }
60 | if ((x = (x) / (MAXNOPS)))
61 | __delay_4cycles(x); // if need more then 4 nop loop is more optimal
62 | }
63 |
64 | #undef MAXNOPS
65 | }
66 | else
67 | __delay_4cycles(x / 4);
68 | }
69 | #undef nop
70 |
71 | /* ---------------- Delay in nanoseconds */
72 | #define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) / 1000L )
73 |
74 | /* ---------------- Delay in microseconds */
75 | #define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) )
76 |
77 | #endif // MARLIN_DELAY_H
78 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_7.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 3974 K, 4.7 kOhm pull-up, Honeywell 135-104LAG-J01
24 | const short temptable_7[][2] PROGMEM = {
25 | { OV( 1), 941 },
26 | { OV( 19), 362 },
27 | { OV( 37), 299 }, // top rating 300C
28 | { OV( 55), 266 },
29 | { OV( 73), 245 },
30 | { OV( 91), 229 },
31 | { OV( 109), 216 },
32 | { OV( 127), 206 },
33 | { OV( 145), 197 },
34 | { OV( 163), 190 },
35 | { OV( 181), 183 },
36 | { OV( 199), 177 },
37 | { OV( 217), 171 },
38 | { OV( 235), 166 },
39 | { OV( 253), 162 },
40 | { OV( 271), 157 },
41 | { OV( 289), 153 },
42 | { OV( 307), 149 },
43 | { OV( 325), 146 },
44 | { OV( 343), 142 },
45 | { OV( 361), 139 },
46 | { OV( 379), 135 },
47 | { OV( 397), 132 },
48 | { OV( 415), 129 },
49 | { OV( 433), 126 },
50 | { OV( 451), 123 },
51 | { OV( 469), 121 },
52 | { OV( 487), 118 },
53 | { OV( 505), 115 },
54 | { OV( 523), 112 },
55 | { OV( 541), 110 },
56 | { OV( 559), 107 },
57 | { OV( 577), 105 },
58 | { OV( 595), 102 },
59 | { OV( 613), 99 },
60 | { OV( 631), 97 },
61 | { OV( 649), 94 },
62 | { OV( 667), 92 },
63 | { OV( 685), 89 },
64 | { OV( 703), 86 },
65 | { OV( 721), 84 },
66 | { OV( 739), 81 },
67 | { OV( 757), 78 },
68 | { OV( 775), 75 },
69 | { OV( 793), 72 },
70 | { OV( 811), 69 },
71 | { OV( 829), 66 },
72 | { OV( 847), 62 },
73 | { OV( 865), 59 },
74 | { OV( 883), 55 },
75 | { OV( 901), 51 },
76 | { OV( 919), 46 },
77 | { OV( 937), 41 },
78 | { OV( 955), 35 },
79 | { OV( 973), 27 },
80 | { OV( 991), 17 },
81 | { OV(1009), 1 },
82 | { OV(1023), 0 } // to allow internal 0 degrees C
83 | };
84 |
--------------------------------------------------------------------------------
/Marlin/pins_CHEAPTRONIC.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Cheaptronic v1.0 pin assignments
25 | */
26 |
27 | #ifndef __AVR_ATmega2560__
28 | #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 | #endif
30 |
31 | #define BOARD_NAME "Cheaptronic v1.0"
32 | //
33 | // Limit Switches
34 | //
35 | #define X_STOP_PIN 3
36 | #define Y_STOP_PIN 2
37 | #define Z_STOP_PIN 5
38 |
39 | //
40 | // Steppers
41 | //
42 | #define X_STEP_PIN 14
43 | #define X_DIR_PIN 15
44 | #define X_ENABLE_PIN 24
45 |
46 | #define Y_STEP_PIN 35
47 | #define Y_DIR_PIN 36
48 | #define Y_ENABLE_PIN 31
49 |
50 | #define Z_STEP_PIN 40
51 | #define Z_DIR_PIN 41
52 | #define Z_ENABLE_PIN 37
53 |
54 | #define E0_STEP_PIN 26
55 | #define E0_DIR_PIN 28
56 | #define E0_ENABLE_PIN 25
57 |
58 | #define E1_STEP_PIN 33
59 | #define E1_DIR_PIN 34
60 | #define E1_ENABLE_PIN 30
61 |
62 | //
63 | // Temperature sensors
64 | //
65 | #define TEMP_0_PIN 15 // Analog Input
66 | #define TEMP_1_PIN 14 // Analog Input
67 | #define TEMP_BED_PIN 13 // Analog Input
68 |
69 | //
70 | // Heaters / Fans
71 | //
72 | #define HEATER_0_PIN 19 // EXTRUDER 1
73 | #define HEATER_1_PIN 23 // EXTRUDER 2
74 | #define HEATER_BED_PIN 22
75 |
76 | //
77 | // LCD / Controller
78 | //
79 | // Cheaptronic v1.0 doesn't support LCD
80 | #define LCD_PINS_RS -1
81 | #define LCD_PINS_ENABLE -1
82 |
83 | // Cheaptronic v1.0 doesn't support keypad
84 | #define BTN_EN1 -1
85 | #define BTN_EN2 -1
86 | #define BTN_ENC -1
87 |
--------------------------------------------------------------------------------
/Marlin/pins_TRIGORILLA_14.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Arduino Mega with RAMPS v1.4 for Anycubic
25 | */
26 |
27 | #ifndef BOARD_NAME
28 | #define BOARD_NAME "Anycubic RAMPS 1.4"
29 | #endif
30 |
31 | #define IS_RAMPS_EFB
32 |
33 | // FAN0 / D9 - Typically used for the part fan on Anycubic Delta devices
34 | #define FAN_PIN 9
35 |
36 | // FAN1 / D7 - Typically unused, can be allocated as Case Fan
37 |
38 | // FAN2 / D44 - Typical Extruder Fan on Anycubic Delta devices
39 | #define FAN2_PIN 44
40 | #define ORIG_E0_AUTO_FAN_PIN 44
41 |
42 | #include "pins_RAMPS.h"
43 |
44 | // TODO 1.4 boards do have an E1 stepper driver. However the pin definitions
45 | // from pins_RAMPS.h are incorrect for this board. e.g., Pin 44 is the Extruder fan.
46 | #undef E1_STEP_PIN
47 | #undef E1_DIR_PIN
48 | #undef E1_ENABLE_PIN
49 | #undef E1_CS_PIN
50 |
51 | //
52 | // AnyCubic made the following changes to 1.1.0-RC8
53 | // If these are appropriate for your LCD let us know.
54 | //
55 | #if 0 && ENABLED(ULTRA_LCD)
56 |
57 | // LCD Display output pins
58 | #if ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
59 | #undef LCD_PINS_D6
60 | #define LCD_PINS_D6 57
61 | #endif
62 |
63 | // LCD Display input pins
64 | #if ENABLED(NEWPANEL)
65 | #if ENABLED(VIKI2) || ENABLED(miniVIKI)
66 | #undef DOGLCD_A0
67 | #define DOGLCD_A0 23
68 | #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
69 | #undef BEEPER_PIN
70 | #define BEEPER_PIN 33
71 | #undef LCD_BACKLIGHT_PIN
72 | #define LCD_BACKLIGHT_PIN 67
73 | #endif
74 | #elif ENABLED(MINIPANEL)
75 | #undef BEEPER_PIN
76 | #define BEEPER_PIN 33
77 | #undef DOGLCD_A0
78 | #define DOGLCD_A0 42
79 | #endif
80 |
81 | #endif // ULTRA_LCD
82 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/delta/Anycubic/Kossel/README.md:
--------------------------------------------------------------------------------
1 | # Readme
2 |
3 | These configurations activate many of the new advanced features of the Marlin firmware:
4 |
5 | * Auto Calibration
6 | * Auto Bed Leveling
7 | * Pause & Filament Change
8 |
9 | **Important**: Before doing anything else after updating the firmware, go to `Configuration > Advanced Settings > Initialize EEPROM` to get rid of old configurations.
10 |
11 | Then you should execute `Configuration > Delta Calibration > Set Delta Height` and also run `Configuration > Delta Configuration > Probe Z-offset` to verify the Probe offset.
12 |
13 | After that you should connect the Z-Probe and start `Configuration > Delta Calibration > Auto Calibration`. When it's done don't forget to also do `Configuration > Delta Calibration > Store Settings` to make it permanent.
14 |
15 | You should also do a `Motion > Bed Leveling > Level bed` followed by `Store Settings` to ensure a perfect leveling.
16 |
17 | Please do a manual paper test (moving the nozzle slowly down to Z0 and checking with a piece of paper). If it's not perfect, use `Configuration > Advanced Settings > Probe Z Offset` to correct the difference and execute the calibration again.
18 |
19 |
20 | # Select the Configuration
21 |
22 | **Please select the correct values at the start of the Configuration.h file**
23 |
24 | The Kossel comes in 3 versions:
25 |
26 | * Pulley
27 | * Linear
28 | * Linear Plus
29 |
30 | Pulley and Linear use the same configuration, the Linear Plus is bigger and uses slightly different configurations.
31 |
32 | Typically the probes for the Anycubic Delta Kossel printers come in two different versions.
33 |
34 | * Version 1: Z Probe Offset of -19.0mm
35 |
36 | 
37 |
38 | * Version 2: Z Probe Offset of -16.8mm
39 |
40 | 
41 |
42 | If you select the `ANYCUBIC_PROBE_VERSION 0`: It's very important to follow the correct procedure to set it up after flashing the firmware, otherwise you might damage the printer by ramming the nozzle into the buildplate:
43 |
44 | * `Configuration > Advanced Settings > Initialize EEPROM`
45 | * `Motion > Move Axis > Soft Endstops` : `Off`
46 | * Auto Home and slowly move the nozzle down until it barely touches the bed. (Do a paper-test: A normal sheet of paper should just feel the drag of the nozzle) and note this number.
47 | * Subtract this number from the value in `Configuration > Delta Calibration > Delta Settings > Height`. (If it's negative, add it).
48 | * Save and try the paper test again to verify your height.
49 | * `Configuration > Store Settings`
50 | * Motion > Bed Leveling (using paper test)
51 |
--------------------------------------------------------------------------------
/Marlin/least_squares_fit.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Least Squares Best Fit by Roxy and Ed Williams
25 | *
26 | * This algorithm is high speed and has a very small code footprint.
27 | * Its results are identical to both the Iterative Least-Squares published
28 | * earlier by Roxy and the QR_SOLVE solution. If used in place of QR_SOLVE
29 | * it saves roughly 10K of program memory. It also does not require all of
30 | * coordinates to be present during the calculations. Each point can be
31 | * probed and then discarded.
32 | *
33 | */
34 |
35 | #include "MarlinConfig.h"
36 |
37 | #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_LINEAR)
38 |
39 | #include "macros.h"
40 | #include
41 |
42 | #include "least_squares_fit.h"
43 |
44 | int finish_incremental_LSF(struct linear_fit_data *lsf) {
45 |
46 | const float N = lsf->N;
47 |
48 | if (N == 0.0)
49 | return 1;
50 |
51 | lsf->xbar /= N;
52 | lsf->ybar /= N;
53 | lsf->zbar /= N;
54 | lsf->x2bar = lsf->x2bar / N - sq(lsf->xbar);
55 | lsf->y2bar = lsf->y2bar / N - sq(lsf->ybar);
56 | lsf->z2bar = lsf->z2bar / N - sq(lsf->zbar);
57 | lsf->xybar = lsf->xybar / N - lsf->xbar * lsf->ybar;
58 | lsf->yzbar = lsf->yzbar / N - lsf->ybar * lsf->zbar;
59 | lsf->xzbar = lsf->xzbar / N - lsf->xbar * lsf->zbar;
60 | const float DD = lsf->x2bar * lsf->y2bar - sq(lsf->xybar);
61 |
62 | if (ABS(DD) <= 1e-10 * (lsf->max_absx + lsf->max_absy))
63 | return 1;
64 |
65 | lsf->A = (lsf->yzbar * lsf->xybar - lsf->xzbar * lsf->y2bar) / DD;
66 | lsf->B = (lsf->xzbar * lsf->xybar - lsf->yzbar * lsf->x2bar) / DD;
67 | lsf->D = -(lsf->zbar + lsf->A * lsf->xbar + lsf->B * lsf->ybar);
68 | return 0;
69 | }
70 |
71 | #endif // AUTO_BED_LEVELING_UBL || ENABLED(AUTO_BED_LEVELING_LINEAR)
72 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_1.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 4092 K, 4.7 kOhm pull-up, bed thermistor
24 | const short temptable_1[][2] PROGMEM = {
25 | { OV( 23), 300 },
26 | { OV( 25), 295 },
27 | { OV( 27), 290 },
28 | { OV( 28), 285 },
29 | { OV( 31), 280 },
30 | { OV( 33), 275 },
31 | { OV( 35), 270 },
32 | { OV( 38), 265 },
33 | { OV( 41), 260 },
34 | { OV( 44), 255 },
35 | { OV( 48), 250 },
36 | { OV( 52), 245 },
37 | { OV( 56), 240 },
38 | { OV( 61), 235 },
39 | { OV( 66), 230 },
40 | { OV( 71), 225 },
41 | { OV( 78), 220 },
42 | { OV( 84), 215 },
43 | { OV( 92), 210 },
44 | { OV( 100), 205 },
45 | { OV( 109), 200 },
46 | { OV( 120), 195 },
47 | { OV( 131), 190 },
48 | { OV( 143), 185 },
49 | { OV( 156), 180 },
50 | { OV( 171), 175 },
51 | { OV( 187), 170 },
52 | { OV( 205), 165 },
53 | { OV( 224), 160 },
54 | { OV( 245), 155 },
55 | { OV( 268), 150 },
56 | { OV( 293), 145 },
57 | { OV( 320), 140 },
58 | { OV( 348), 135 },
59 | { OV( 379), 130 },
60 | { OV( 411), 125 },
61 | { OV( 445), 120 },
62 | { OV( 480), 115 },
63 | { OV( 516), 110 },
64 | { OV( 553), 105 },
65 | { OV( 591), 100 },
66 | { OV( 628), 95 },
67 | { OV( 665), 90 },
68 | { OV( 702), 85 },
69 | { OV( 737), 80 },
70 | { OV( 770), 75 },
71 | { OV( 801), 70 },
72 | { OV( 830), 65 },
73 | { OV( 857), 60 },
74 | { OV( 881), 55 },
75 | { OV( 903), 50 },
76 | { OV( 922), 45 },
77 | { OV( 939), 40 },
78 | { OV( 954), 35 },
79 | { OV( 966), 30 },
80 | { OV( 977), 25 },
81 | { OV( 985), 20 },
82 | { OV( 993), 15 },
83 | { OV( 999), 10 },
84 | { OV(1004), 5 },
85 | { OV(1008), 0 },
86 | { OV(1012), -5 },
87 | { OV(1016), -10 },
88 | { OV(1020), -15 }
89 | };
90 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_51.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 4092 K, 1 kOhm pull-up,
24 | // 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
25 | // Verified by linagee.
26 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
27 | // Advantage: Twice the resolution and better linearity from 150C to 200C
28 | const short temptable_51[][2] PROGMEM = {
29 | { OV( 1), 350 },
30 | { OV( 190), 250 }, // top rating 250C
31 | { OV( 203), 245 },
32 | { OV( 217), 240 },
33 | { OV( 232), 235 },
34 | { OV( 248), 230 },
35 | { OV( 265), 225 },
36 | { OV( 283), 220 },
37 | { OV( 302), 215 },
38 | { OV( 322), 210 },
39 | { OV( 344), 205 },
40 | { OV( 366), 200 },
41 | { OV( 390), 195 },
42 | { OV( 415), 190 },
43 | { OV( 440), 185 },
44 | { OV( 467), 180 },
45 | { OV( 494), 175 },
46 | { OV( 522), 170 },
47 | { OV( 551), 165 },
48 | { OV( 580), 160 },
49 | { OV( 609), 155 },
50 | { OV( 638), 150 },
51 | { OV( 666), 145 },
52 | { OV( 695), 140 },
53 | { OV( 722), 135 },
54 | { OV( 749), 130 },
55 | { OV( 775), 125 },
56 | { OV( 800), 120 },
57 | { OV( 823), 115 },
58 | { OV( 845), 110 },
59 | { OV( 865), 105 },
60 | { OV( 884), 100 },
61 | { OV( 901), 95 },
62 | { OV( 917), 90 },
63 | { OV( 932), 85 },
64 | { OV( 944), 80 },
65 | { OV( 956), 75 },
66 | { OV( 966), 70 },
67 | { OV( 975), 65 },
68 | { OV( 982), 60 },
69 | { OV( 989), 55 },
70 | { OV( 995), 50 },
71 | { OV(1000), 45 },
72 | { OV(1004), 40 },
73 | { OV(1007), 35 },
74 | { OV(1010), 30 },
75 | { OV(1013), 25 },
76 | { OV(1015), 20 },
77 | { OV(1017), 15 },
78 | { OV(1018), 10 },
79 | { OV(1019), 5 },
80 | { OV(1020), 0 },
81 | { OV(1021), -5 }
82 | };
83 |
--------------------------------------------------------------------------------
/Marlin/fwretract.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * fwretract.h - Define firmware-based retraction interface
25 | */
26 |
27 | #ifndef FWRETRACT_H
28 | #define FWRETRACT_H
29 |
30 | #include "MarlinConfig.h"
31 |
32 | class FWRetract {
33 | public:
34 | static bool autoretract_enabled, // M209 S - Autoretract switch
35 | retracted[EXTRUDERS]; // Which extruders are currently retracted
36 | #if EXTRUDERS > 1
37 | static bool retracted_swap[EXTRUDERS]; // Which extruders are swap-retracted
38 | #endif
39 | static float retract_length, // M207 S - G10 Retract length
40 | retract_feedrate_mm_s, // M207 F - G10 Retract feedrate
41 | retract_zlift, // M207 Z - G10 Retract hop size
42 | retract_recover_length, // M208 S - G11 Recover length
43 | retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
44 | swap_retract_length, // M207 W - G10 Swap Retract length
45 | swap_retract_recover_length, // M208 W - G11 Swap Recover length
46 | swap_retract_recover_feedrate_mm_s, // M208 R - G11 Swap Recover feedrate
47 | hop_amount;
48 |
49 | FWRetract() { reset(); }
50 |
51 | static void reset();
52 |
53 | static void refresh_autoretract() {
54 | for (uint8_t i = 0; i < EXTRUDERS; i++) retracted[i] = false;
55 | }
56 |
57 | static void enable_autoretract(const bool enable) {
58 | autoretract_enabled = enable;
59 | refresh_autoretract();
60 | }
61 |
62 | static void retract(const bool retracting
63 | #if EXTRUDERS > 1
64 | , bool swapping = false
65 | #endif
66 | );
67 | };
68 |
69 | extern FWRetract fwretract;
70 |
71 | #endif // FWRETRACT_H
72 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #
2 | # Marlin 3D Printer Firmware
3 | # Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | #
5 | # Based on Sprinter and grbl.
6 | # Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | #
8 | # This program is free software: you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation, either version 3 of the License, or
11 | # (at your option) any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program. If not, see .
20 | #
21 |
22 | # Our automatic versioning scheme generates the following file
23 | # NEVER put it in the repository
24 | _Version.h
25 |
26 | #
27 | # OS
28 | #
29 | applet/
30 | *.DS_Store
31 |
32 |
33 | #
34 | # Misc
35 | #
36 | *~
37 | *.orig
38 | *.rej
39 | *.bak
40 | *.idea
41 | *.s
42 | *.i
43 | *.ii
44 | *.swp
45 | tags
46 |
47 | #
48 | # C++
49 | #
50 | # Compiled Object files
51 | *.slo
52 | *.lo
53 | *.o
54 | *.obj
55 | *.ino.cpp
56 |
57 | # Precompiled Headers
58 | *.gch
59 | *.pch
60 |
61 | # Compiled Dynamic libraries
62 | *.so
63 | *.dylib
64 | *.dll
65 |
66 | # Fortran module files
67 | *.mod
68 | *.smod
69 |
70 | # Compiled Static libraries
71 | *.lai
72 | *.la
73 | *.a
74 | *.lib
75 |
76 | # Executables
77 | *.exe
78 | *.out
79 | *.app
80 |
81 |
82 | #
83 | # C
84 | #
85 | # Object files
86 | *.o
87 | *.ko
88 | *.obj
89 | *.elf
90 |
91 | # Precompiled Headers
92 | *.gch
93 | *.pch
94 |
95 | # Libraries
96 | *.lib
97 | *.a
98 | *.la
99 | *.lo
100 |
101 | # Shared objects (inc. Windows DLLs)
102 | *.dll
103 | *.so
104 | *.so.*
105 | *.dylib
106 |
107 | # Executables
108 | *.exe
109 | *.out
110 | *.app
111 | *.i*86
112 | *.x86_64
113 | *.hex
114 |
115 | # Debug files
116 | *.dSYM/
117 | *.su
118 |
119 | # PlatformIO files/dirs
120 | .pio*
121 | .pioenvs
122 | .piolibdeps
123 | lib/readme.txt
124 |
125 | #Visual Studio
126 | *.sln
127 | *.vcxproj
128 | *.vcxproj.user
129 | *.vcxproj.filters
130 | Release/
131 | Debug/
132 | __vm/
133 | .vs/
134 | vc-fileutils.settings
135 |
136 | #Visual Studio Code
137 | .vscode
138 | .vscode/.browse.c_cpp.db*
139 | .vscode/c_cpp_properties.json
140 | .vscode/launch.json
141 | .vscode/*.db
142 |
143 | #cmake
144 | CMakeLists.txt
145 | Marlin/CMakeLists.txt
146 | CMakeListsPrivate.txt
147 |
148 | #CLion
149 | cmake-build-*
150 |
--------------------------------------------------------------------------------
/Marlin/thermistortable_71.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | // R25 = 100 kOhm, beta25 = 3974 K, 4.7 kOhm pull-up, Honeywell 135-104LAF-J01
24 | // R0 = 100000 Ohm
25 | // T0 = 25 °C
26 | // Beta = 3974
27 | // R1 = 0 Ohm
28 | // R2 = 4700 Ohm
29 | const short temptable_71[][2] PROGMEM = {
30 | { OV( 35), 300 },
31 | { OV( 51), 269 },
32 | { OV( 59), 258 },
33 | { OV( 64), 252 },
34 | { OV( 71), 244 },
35 | { OV( 81), 235 },
36 | { OV( 87), 230 },
37 | { OV( 92), 226 },
38 | { OV( 102), 219 },
39 | { OV( 110), 214 },
40 | { OV( 115), 211 },
41 | { OV( 126), 205 },
42 | { OV( 128), 204 },
43 | { OV( 130), 203 },
44 | { OV( 132), 202 },
45 | { OV( 134), 201 },
46 | { OV( 136), 200 },
47 | { OV( 147), 195 },
48 | { OV( 154), 192 },
49 | { OV( 159), 190 },
50 | { OV( 164), 188 },
51 | { OV( 172), 185 },
52 | { OV( 175), 184 },
53 | { OV( 178), 183 },
54 | { OV( 181), 182 },
55 | { OV( 184), 181 },
56 | { OV( 187), 180 },
57 | { OV( 190), 179 },
58 | { OV( 193), 178 },
59 | { OV( 196), 177 },
60 | { OV( 199), 176 },
61 | { OV( 202), 175 },
62 | { OV( 205), 174 },
63 | { OV( 208), 173 },
64 | { OV( 215), 171 },
65 | { OV( 237), 165 },
66 | { OV( 256), 160 },
67 | { OV( 300), 150 },
68 | { OV( 351), 140 },
69 | { OV( 470), 120 },
70 | { OV( 504), 115 },
71 | { OV( 538), 110 },
72 | { OV( 745), 80 },
73 | { OV( 770), 76 },
74 | { OV( 806), 70 },
75 | { OV( 829), 66 },
76 | { OV( 860), 60 },
77 | { OV( 879), 56 },
78 | { OV( 888), 54 },
79 | { OV( 905), 50 },
80 | { OV( 924), 45 },
81 | { OV( 940), 40 },
82 | { OV( 955), 35 },
83 | { OV( 972), 28 },
84 | { OV( 974), 27 },
85 | { OV( 976), 26 },
86 | { OV( 978), 25 },
87 | { OV( 980), 24 },
88 | { OV( 987), 20 },
89 | { OV( 995), 15 },
90 | { OV(1001), 10 },
91 | { OV(1006), 5 },
92 | { OV(1010), 0 }
93 | };
94 |
--------------------------------------------------------------------------------
/Marlin/SdFatUtil.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Arduino SdFat Library
25 | * Copyright (C) 2008 by William Greiman
26 | *
27 | * This file is part of the Arduino Sd2Card Library
28 | */
29 | #include "MarlinConfig.h"
30 |
31 | #if ENABLED(SDSUPPORT)
32 |
33 | #include "SdFatUtil.h"
34 | #include "serial.h"
35 |
36 | /**
37 | * Amount of free RAM
38 | * \return The number of free bytes.
39 | */
40 | #ifdef __arm__
41 | extern "C" char* sbrk(int incr);
42 | int SdFatUtil::FreeRam() {
43 | char top;
44 | return &top - reinterpret_cast(sbrk(0));
45 | }
46 | #else // __arm__
47 | extern char* __brkval;
48 | extern char __bss_end;
49 | /**
50 | * Amount of free RAM
51 | * \return The number of free bytes.
52 | */
53 | int SdFatUtil::FreeRam() {
54 | char top;
55 | return __brkval ? &top - __brkval : &top - &__bss_end;
56 | }
57 | #endif // __arm
58 |
59 | /**
60 | * %Print a string in flash memory.
61 | *
62 | * \param[in] pr Print object for output.
63 | * \param[in] str Pointer to string stored in flash memory.
64 | */
65 | void SdFatUtil::print_P(PGM_P str) {
66 | for (uint8_t c; (c = pgm_read_byte(str)); str++) SERIAL_CHAR(c);
67 | }
68 |
69 | /**
70 | * %Print a string in flash memory followed by a CR/LF.
71 | *
72 | * \param[in] pr Print object for output.
73 | * \param[in] str Pointer to string stored in flash memory.
74 | */
75 | void SdFatUtil::println_P(PGM_P str) { print_P(str); SERIAL_EOL(); }
76 |
77 | /**
78 | * %Print a string in flash memory to Serial.
79 | *
80 | * \param[in] str Pointer to string stored in flash memory.
81 | */
82 | void SdFatUtil::SerialPrint_P(PGM_P str) { print_P(str); }
83 |
84 | /**
85 | * %Print a string in flash memory to Serial followed by a CR/LF.
86 | *
87 | * \param[in] str Pointer to string stored in flash memory.
88 | */
89 | void SdFatUtil::SerialPrintln_P(PGM_P str) { println_P(str); }
90 |
91 | #endif // SDSUPPORT
92 |
--------------------------------------------------------------------------------
/Marlin/vector_3.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | vector_3.cpp - Vector library for bed leveling
25 | Copyright (c) 2012 Lars Brubaker. All right reserved.
26 |
27 | This library is free software; you can redistribute it and/or
28 | modify it under the terms of the GNU Lesser General Public
29 | License as published by the Free Software Foundation; either
30 | version 2.1 of the License, or (at your option) any later version.
31 |
32 | This library is distributed in the hope that it will be useful,
33 | but WITHOUT ANY WARRANTY; without even the implied warranty of
34 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35 | Lesser General Public License for more details.
36 |
37 | You should have received a copy of the GNU Lesser General Public
38 | License along with this library; if not, write to the Free Software
39 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
40 | */
41 | #ifndef VECTOR_3_H
42 | #define VECTOR_3_H
43 |
44 | class matrix_3x3;
45 |
46 | struct vector_3 {
47 | float x, y, z;
48 |
49 | vector_3();
50 | vector_3(float x, float y, float z);
51 |
52 | static vector_3 cross(vector_3 a, vector_3 b);
53 |
54 | vector_3 operator+(vector_3 v);
55 | vector_3 operator-(vector_3 v);
56 | void normalize();
57 | float get_length();
58 | vector_3 get_normal();
59 |
60 | void debug(const char * const title);
61 |
62 | void apply_rotation(matrix_3x3 matrix);
63 | };
64 |
65 | struct matrix_3x3 {
66 | float matrix[9];
67 |
68 | static matrix_3x3 create_from_rows(vector_3 row_0, vector_3 row_1, vector_3 row_2);
69 | static matrix_3x3 create_look_at(vector_3 target);
70 | static matrix_3x3 transpose(matrix_3x3 original);
71 |
72 | void set_to_identity();
73 |
74 | void debug(const char * const title);
75 | };
76 |
77 |
78 | void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float &y, float &z);
79 |
80 | #endif // VECTOR_3_H
81 |
--------------------------------------------------------------------------------
/Marlin/example_configurations/JGAurora/A5/README.md:
--------------------------------------------------------------------------------
1 | # Configuration for JGAurora A5 printer
2 |
3 | ## Firmware Installation Instructions
4 |
5 | To install custom firmware:
6 |
7 | - Download and install arduino IDE software from https://www.arduino.cc/en/Main/Software
8 | - Plug in A5 to your computer via USB cable
9 | - In arduino IDE, under the Tools menu, set:
10 | – **Board** to "Arduino/Genuino Mega or Mega 2560"
11 | – ***Processor*** to "Atmega 2560 (Mega 2560)"
12 | – **Port** to your 3D printer’s serial port. To figure out the correct serial port unplug the printer and observe the "Port" menu. Connect the printer's USB cable, re-open the "Port" menu and see if a new ports has appeared. This new port is likely to be your printer.
13 | - If you can’t find the right port or if your machine isn't detected, you may need to install a driver for the CH340 serial-to-USB interface chip in the printer.
14 | - [macOS CH340 Serial Driver](http://sampin.ch/ch340-driver-mac)
15 | - [Windows CH340 Serial Driver](https://sparks.gogo.co.nz/ch340.html)
16 | - Install the u8glib library using the library manager in the menu "Sketch -> Include Library -> Manage Libraries."
17 | - IMPORTANT: Unplug the 8-pin LCD panel header connector on your printer. The LCD should turn off completely. This is found underneath the LCD, and can be accessed from underneath the printer without removing any screws. Remember where it goes so you can put it back after flashing.
18 | - Close all other programs (Cura, Repetier Host, JGCreat, etc.) that could connect to the serial port.
19 | - Open the "Marlin.ino" file in Arduino IDE and wait for the new project window to appear.
20 | - Select "Upload" from the "Sketch" menu or click the Upload button.
21 | - Wait for the firmware to finish uploading and verifying. This may take a couple of minutes.
22 | - Plug the LCD connector back in.
23 | - In the Arduino IDE, select "Tools -> Serial monitor" to open up a simple console. In the popup menus, select "Newline" and a Baud Rate of "250000."
24 | - In the input box, enter the following G-code commands:
25 | - `M502` (press return) to reset settings (in RAM) to your configured defaults.
26 | - `M500` (press return) to write settings and initialize the EEPROM.
27 |
28 | ## Graphical Display
29 |
30 | The control panel included with the JGAurora interfaces only indirectly with Marlin, and this imposes some limitations. But you can use a RepRap Discount Full Graphic Smart Controller with the JGAurora A5 by applying the following additional settings in `Configuration.h`:
31 |
32 | ```cpp
33 | #define ENCODER_PULSES_PER_STEP 5
34 | #define ENCODER_STEPS_PER_MENU_ITEM 1
35 | #define REVERSE_ENCODER_DIRECTION
36 | #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
37 | ```
38 |
39 | You may also be able to change `BEEPER_PIN` to use the piezo on the LCD controller instead of the one on the board.
40 |
--------------------------------------------------------------------------------
/Marlin/digipot_mcp4451.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #include "MarlinConfig.h"
24 |
25 | #if ENABLED(DIGIPOT_I2C) && DISABLED(DIGIPOT_MCP4018)
26 |
27 | #include "Stream.h"
28 | #include "utility/twi.h"
29 | #include "Wire.h"
30 |
31 | // Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
32 | #if MB(5DPRINT)
33 | #define DIGIPOT_I2C_FACTOR 117.96
34 | #define DIGIPOT_I2C_MAX_CURRENT 1.736
35 | #else
36 | #define DIGIPOT_I2C_FACTOR 106.7
37 | #define DIGIPOT_I2C_MAX_CURRENT 2.5
38 | #endif
39 |
40 | static byte current_to_wiper(const float current) {
41 | return byte(CEIL(float((DIGIPOT_I2C_FACTOR * current))));
42 | }
43 |
44 | static void i2c_send(const byte addr, const byte a, const byte b) {
45 | Wire.beginTransmission(addr);
46 | Wire.write(a);
47 | Wire.write(b);
48 | Wire.endTransmission();
49 | }
50 |
51 | // This is for the MCP4451 I2C based digipot
52 | void digipot_i2c_set_current(uint8_t channel, float current) {
53 | current = MIN((float) MAX(current, 0), DIGIPOT_I2C_MAX_CURRENT);
54 | // these addresses are specific to Azteeg X3 Pro, can be set to others,
55 | // In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
56 | byte addr = 0x2C; // channel 0-3
57 | if (channel >= 4) {
58 | addr = 0x2E; // channel 4-7
59 | channel -= 4;
60 | }
61 |
62 | // Initial setup
63 | i2c_send(addr, 0x40, 0xFF);
64 | i2c_send(addr, 0xA0, 0xFF);
65 |
66 | // Set actual wiper value
67 | byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };
68 | i2c_send(addr, addresses[channel], current_to_wiper(current));
69 | }
70 |
71 | void digipot_i2c_init() {
72 | static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
73 | Wire.begin();
74 | // setup initial currents as defined in Configuration_adv.h
75 | for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
76 | digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
77 | }
78 |
79 | #endif // DIGIPOT_I2C
80 |
--------------------------------------------------------------------------------
/Marlin/power_loss_recovery.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * power_loss_recovery.h - Resume an SD print after power-loss
25 | */
26 |
27 | #ifndef _POWER_LOSS_RECOVERY_H_
28 | #define _POWER_LOSS_RECOVERY_H_
29 |
30 | #include "cardreader.h"
31 | #include "types.h"
32 | #include "MarlinConfig.h"
33 |
34 | #define SAVE_INFO_INTERVAL_MS 0
35 | //#define SAVE_EACH_CMD_MODE
36 | //#define DEBUG_POWER_LOSS_RECOVERY
37 |
38 | typedef struct {
39 | uint8_t valid_head;
40 |
41 | // Machine state
42 | float current_position[NUM_AXIS], feedrate;
43 |
44 | #if HOTENDS > 1
45 | uint8_t active_hotend;
46 | #endif
47 |
48 | int16_t target_temperature[HOTENDS];
49 |
50 | #if HAS_HEATED_BED
51 | int16_t target_temperature_bed;
52 | #endif
53 |
54 | #if FAN_COUNT
55 | int16_t fanSpeeds[FAN_COUNT];
56 | #endif
57 |
58 | #if HAS_LEVELING
59 | bool leveling;
60 | float fade;
61 | #endif
62 |
63 | // Command queue
64 | uint8_t cmd_queue_index_r, commands_in_queue;
65 | char command_queue[BUFSIZE][MAX_CMD_SIZE];
66 |
67 | // SD Filename and position
68 | char sd_filename[MAXPATHNAMELENGTH];
69 | uint32_t sdpos;
70 |
71 | // Job elapsed time
72 | millis_t print_job_elapsed;
73 |
74 | uint8_t valid_foot;
75 | } job_recovery_info_t;
76 |
77 | extern job_recovery_info_t job_recovery_info;
78 |
79 | enum JobRecoveryPhase : unsigned char {
80 | JOB_RECOVERY_IDLE,
81 | JOB_RECOVERY_MAYBE,
82 | JOB_RECOVERY_YES,
83 | JOB_RECOVERY_DONE
84 | };
85 | extern JobRecoveryPhase job_recovery_phase;
86 |
87 | #if HAS_LEVELING
88 | #define APPEND_CMD_COUNT 9
89 | #else
90 | #define APPEND_CMD_COUNT 7
91 | #endif
92 |
93 | extern char job_recovery_commands[BUFSIZE + APPEND_CMD_COUNT][MAX_CMD_SIZE];
94 | extern uint8_t job_recovery_commands_count;
95 |
96 | void check_print_job_recovery();
97 | void save_job_recovery_info();
98 |
99 | #endif // _POWER_LOSS_RECOVERY_H_
100 |
--------------------------------------------------------------------------------
/Marlin/pins_LEAPFROG.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Leapfrog Driver board pin assignments
25 | */
26 |
27 | #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
28 | #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 | #endif
30 |
31 | #define BOARD_NAME "Leapfrog"
32 |
33 | //
34 | // Limit Switches
35 | //
36 | #define X_MIN_PIN 47
37 | #define X_MAX_PIN 2
38 | #define Y_MIN_PIN 48
39 | #define Y_MAX_PIN 15
40 | #define Z_MIN_PIN 49
41 | #define Z_MAX_PIN -1
42 |
43 | //
44 | // Steppers
45 | //
46 | #define X_STEP_PIN 28
47 | #define X_DIR_PIN 63
48 | #define X_ENABLE_PIN 29
49 |
50 | #define Y_STEP_PIN 14 // A6
51 | #define Y_DIR_PIN 15 // A0
52 | #define Y_ENABLE_PIN 39
53 |
54 | #define Z_STEP_PIN 31 // A2
55 | #define Z_DIR_PIN 32 // A6
56 | #define Z_ENABLE_PIN 30 // A1
57 |
58 | #define E0_STEP_PIN 34 // 34
59 | #define E0_DIR_PIN 35 // 35
60 | #define E0_ENABLE_PIN 33 // 33
61 |
62 | #define E1_STEP_PIN 37 // 37
63 | #define E1_DIR_PIN 40 // 40
64 | #define E1_ENABLE_PIN 36 // 36
65 |
66 | //
67 | // Temperature Sensors
68 | //
69 | #define TEMP_0_PIN 13 // Analog Input (D27)
70 | #define TEMP_1_PIN 15 // Analog Input (1)
71 | #define TEMP_BED_PIN 14 // Analog Input (1,2 or I2C)
72 |
73 | //
74 | // Heaters / Fans
75 | //
76 | #define HEATER_0_PIN 9
77 | #define HEATER_1_PIN 8 // 12
78 | #define HEATER_2_PIN 11 // 13
79 | #define HEATER_BED_PIN 10 // 14/15
80 |
81 | #define FAN_PIN 7
82 |
83 | //
84 | // Misc. Functions
85 | //
86 | #define SDSS 11
87 | #define LED_PIN 13
88 | #define SOL1_PIN 16
89 | #define SOL2_PIN 17
90 |
91 | /* Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31) */
92 |
--------------------------------------------------------------------------------
/Marlin/watchdog.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #include "Marlin.h"
24 |
25 | #if ENABLED(USE_WATCHDOG)
26 |
27 | #include "watchdog.h"
28 |
29 | // Initialize watchdog with 8s timeout, if possible. Otherwise, make it 4s.
30 | void watchdog_init() {
31 | #if ENABLED(WATCHDOG_DURATION_8S) && defined(WDTO_8S)
32 | #define WDTO_NS WDTO_8S
33 | #else
34 | #define WDTO_NS WDTO_4S
35 | #endif
36 | #if ENABLED(WATCHDOG_RESET_MANUAL)
37 | // We enable the watchdog timer, but only for the interrupt.
38 | // Take care, as this requires the correct order of operation, with interrupts disabled.
39 | // See the datasheet of any AVR chip for details.
40 | wdt_reset();
41 | cli();
42 | _WD_CONTROL_REG = _BV(_WD_CHANGE_BIT) | _BV(WDE);
43 | _WD_CONTROL_REG = _BV(WDIE) | (WDTO_NS & 0x07) | ((WDTO_NS & 0x08) << 2); // WDTO_NS directly does not work. bit 0-2 are consecutive in the register but the highest value bit is at bit 5
44 | // So worked for up to WDTO_2S
45 | sei();
46 | wdt_reset();
47 | #else
48 | wdt_enable(WDTO_NS); // The function handles the upper bit correct.
49 | #endif
50 | //delay(10000); // test it!
51 | }
52 |
53 | //===========================================================================
54 | //=================================== ISR ===================================
55 | //===========================================================================
56 |
57 | // Watchdog timer interrupt, called if main program blocks >4sec and manual reset is enabled.
58 | #if ENABLED(WATCHDOG_RESET_MANUAL)
59 | ISR(WDT_vect) {
60 | sei(); // With the interrupt driven serial we need to allow interrupts.
61 | SERIAL_ERROR_START();
62 | SERIAL_ERRORLNPGM("Watchdog barked, please turn off the printer.");
63 | kill(PSTR("ERR:Watchdog")); //kill blocks //up to 16 characters so it fits on a 16x2 display
64 | while (1); //wait for user or serial reset
65 | }
66 | #endif // WATCHDOG_RESET_MANUAL
67 |
68 | #endif // USE_WATCHDOG
69 |
--------------------------------------------------------------------------------
/Marlin/pins_RAMPS_PLUS.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Arduino Mega with RAMPS v1.4Plus, also known as 3DYMY version, pin assignments
25 | * The differences to the RAMPS v1.4 are:
26 | * - Swap heater E0 with E1
27 | * - Swap pins 8 and 10. Bed/Fan/Hotend as labeled on the board are on pins 8/9/10.
28 | * - Change pins 16->42, 17->44 and 29->53 used for display.
29 | *
30 | * Applies to the following boards:
31 | *
32 | * RAMPS_PLUS_EFB (Extruder, Fan, Bed)
33 | * RAMPS_PLUS_EEB (Extruder, Extruder, Bed)
34 | * RAMPS_PLUS_EFF (Extruder, Fan, Fan)
35 | * RAMPS_PLUS_EEF (Extruder, Extruder, Fan)
36 | * RAMPS_PLUS_SF (Spindle, Controller Fan)
37 | *
38 | */
39 |
40 | #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
41 | #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
42 | #endif
43 |
44 | #ifndef BOARD_NAME
45 | #define BOARD_NAME "RAMPS 1.4 Plus"
46 | #endif
47 |
48 | #define RAMPS_D8_PIN 10
49 | #define RAMPS_D10_PIN 8
50 |
51 | #include "pins_RAMPS.h"
52 |
53 | //
54 | // Steppers - Swap E0 / E1 on 3DYMY
55 | //
56 | #undef E0_STEP_PIN
57 | #undef E0_DIR_PIN
58 | #undef E0_ENABLE_PIN
59 |
60 | #undef E1_STEP_PIN
61 | #undef E1_DIR_PIN
62 | #undef E1_ENABLE_PIN
63 |
64 | #define E0_STEP_PIN 36
65 | #define E0_DIR_PIN 34
66 | #define E0_ENABLE_PIN 30
67 |
68 | #define E1_STEP_PIN 26
69 | #define E1_DIR_PIN 28
70 | #define E1_ENABLE_PIN 24
71 |
72 | #undef X_CS_PIN
73 | #undef Y_CS_PIN
74 | #undef Z_CS_PIN
75 | #undef E0_CS_PIN
76 | #undef E1_CS_PIN
77 |
78 | #if ENABLED(ULTRA_LCD) && DISABLED(REPRAPWORLD_GRAPHICAL_LCD) && (DISABLED(NEWPANEL) || DISABLED(PANEL_ONE)) && DISABLED(CR10_STOCKDISPLAY)
79 | #if DISABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
80 | #undef LCD_PINS_RS
81 | #define LCD_PINS_RS 42 // 3DYMY boards pin 16 -> 42
82 | #undef LCD_PINS_ENABLE
83 | #define LCD_PINS_ENABLE 44 // 3DYMY boards pin 17 -> 44
84 | #endif
85 | #undef LCD_PINS_D7
86 | #define LCD_PINS_D7 53 // 3DYMY boards pin 29 -> 53
87 | #endif
88 |
--------------------------------------------------------------------------------
/Marlin/pins_SILVER_GATE.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #if !defined(__AVR_ATmega1281__) && !defined(__AVR_ATmega2561__)
24 | #error Oops! Make sure you have 'Silvergate' selected from the 'Tools -> Boards' menu.
25 | #endif
26 |
27 | #ifndef BOARD_NAME
28 | #define BOARD_NAME "Silver Gate"
29 | #endif
30 |
31 | #define X_STEP_PIN 43
32 | #define X_DIR_PIN 44
33 | #define X_ENABLE_PIN 42
34 | #define X_MIN_PIN 31
35 | #define X_MAX_PIN 34
36 |
37 | #define Y_STEP_PIN 40
38 | #define Y_DIR_PIN 41
39 | #define Y_ENABLE_PIN 39
40 | #define Y_MIN_PIN 32
41 | #define Y_MAX_PIN 35
42 |
43 | #define Z_STEP_PIN 13
44 | #define Z_DIR_PIN 38
45 | #define Z_ENABLE_PIN 14
46 | #define Z_MIN_PIN 33
47 | #define Z_MAX_PIN 36
48 |
49 | #define E0_STEP_PIN 27
50 | #define E0_DIR_PIN 37
51 | #define E0_ENABLE_PIN 45
52 |
53 | #define SDSS 16
54 |
55 | #ifndef FIL_RUNOUT_PIN
56 | #define FIL_RUNOUT_PIN 34 // X_MAX unless overridden
57 | #endif
58 |
59 | #ifndef FAN_PIN
60 | #define FAN_PIN 5
61 | #endif
62 |
63 | #define HEATER_0_PIN 7
64 |
65 | #define ORIG_E0_AUTO_FAN_PIN 3 // Use this by NOT overriding E0_AUTO_FAN_PIN
66 | #define CONTROLLER_FAN_PIN 2
67 |
68 | #define TEMP_0_PIN 7 // Analog Input
69 |
70 | #define HEATER_BED_PIN 8
71 | #define TEMP_BED_PIN 6
72 |
73 | #if ENABLED(DOGLCD)
74 | #if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920
75 | #define LCD_PINS_RS 30
76 | #define LCD_PINS_ENABLE 20
77 | #define LCD_PINS_D4 25
78 | #define BEEPER_PIN 29
79 | #define BTN_EN1 19
80 | #define BTN_EN2 22
81 | #define BTN_ENC 24
82 | #define LCD_BACKLIGHT_PIN 6
83 | #if ENABLED(SILVER_GATE_GLCD_CONTROLLER)
84 | #define KILL_PIN 21
85 | #define HOME_PIN 28
86 | #endif
87 | #endif
88 | #endif
89 |
90 | #define SD_DETECT_PIN 15
91 |
92 | #define STAT_LED_RED_PIN 23
93 | #define STAT_LED_BLUE_PIN 26
94 | #define CASE_LIGHT_PIN 51
95 |
--------------------------------------------------------------------------------
/Marlin/runout.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * runout.h - Runout sensor support
25 | */
26 |
27 | #ifndef _RUNOUT_H_
28 | #define _RUNOUT_H_
29 |
30 | #include "cardreader.h"
31 | #include "printcounter.h"
32 | #include "stepper.h"
33 | #include "Marlin.h"
34 |
35 | #include "MarlinConfig.h"
36 |
37 | #define FIL_RUNOUT_THRESHOLD 5
38 |
39 | class FilamentRunoutSensor {
40 | public:
41 | FilamentRunoutSensor() {}
42 |
43 | static void setup();
44 |
45 | FORCE_INLINE static void reset() { runout_count = 0; filament_ran_out = false; }
46 |
47 | FORCE_INLINE static void run() {
48 | if ((IS_SD_PRINTING || print_job_timer.isRunning()) && check() && !filament_ran_out) {
49 | filament_ran_out = true;
50 | enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
51 | planner.synchronize();
52 | }
53 | }
54 | private:
55 | static bool filament_ran_out;
56 | static uint8_t runout_count;
57 |
58 | FORCE_INLINE static bool check() {
59 | #if NUM_RUNOUT_SENSORS < 2
60 | // A single sensor applying to all extruders
61 | const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;
62 | #else
63 | // Read the sensor for the active extruder
64 | bool is_out;
65 | switch (active_extruder) {
66 | case 0: is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING; break;
67 | case 1: is_out = READ(FIL_RUNOUT2_PIN) == FIL_RUNOUT_INVERTING; break;
68 | #if NUM_RUNOUT_SENSORS > 2
69 | case 2: is_out = READ(FIL_RUNOUT3_PIN) == FIL_RUNOUT_INVERTING; break;
70 | #if NUM_RUNOUT_SENSORS > 3
71 | case 3: is_out = READ(FIL_RUNOUT4_PIN) == FIL_RUNOUT_INVERTING; break;
72 | #if NUM_RUNOUT_SENSORS > 4
73 | case 4: is_out = READ(FIL_RUNOUT5_PIN) == FIL_RUNOUT_INVERTING; break;
74 | #endif
75 | #endif
76 | #endif
77 | }
78 | #endif
79 | return (is_out ? ++runout_count : (runout_count = 0)) > FIL_RUNOUT_THRESHOLD;
80 | }
81 | };
82 |
83 | extern FilamentRunoutSensor runout;
84 |
85 | #endif // _RUNOUT_H_
86 |
--------------------------------------------------------------------------------
/Marlin/stopwatch.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #include "stopwatch.h"
24 |
25 | #include "Marlin.h"
26 |
27 | Stopwatch::State Stopwatch::state;
28 | millis_t Stopwatch::accumulator;
29 | millis_t Stopwatch::startTimestamp;
30 | millis_t Stopwatch::stopTimestamp;
31 |
32 | bool Stopwatch::stop() {
33 | #if ENABLED(DEBUG_STOPWATCH)
34 | Stopwatch::debug(PSTR("stop"));
35 | #endif
36 |
37 | if (isRunning() || isPaused()) {
38 | state = STOPPED;
39 | stopTimestamp = millis();
40 | return true;
41 | }
42 | else return false;
43 | }
44 |
45 | bool Stopwatch::pause() {
46 | #if ENABLED(DEBUG_STOPWATCH)
47 | Stopwatch::debug(PSTR("pause"));
48 | #endif
49 |
50 | if (isRunning()) {
51 | state = PAUSED;
52 | stopTimestamp = millis();
53 | return true;
54 | }
55 | else return false;
56 | }
57 |
58 | bool Stopwatch::start() {
59 | #if ENABLED(DEBUG_STOPWATCH)
60 | Stopwatch::debug(PSTR("start"));
61 | #endif
62 |
63 | if (!isRunning()) {
64 | if (isPaused()) accumulator = duration();
65 | else reset();
66 |
67 | state = RUNNING;
68 | startTimestamp = millis();
69 | return true;
70 | }
71 | else return false;
72 | }
73 |
74 | void Stopwatch::resume(const millis_t duration) {
75 | #if ENABLED(DEBUG_STOPWATCH)
76 | Stopwatch::debug(PSTR("resume"));
77 | #endif
78 |
79 | reset();
80 | if ((accumulator = duration)) state = RUNNING;
81 | }
82 |
83 | void Stopwatch::reset() {
84 | #if ENABLED(DEBUG_STOPWATCH)
85 | Stopwatch::debug(PSTR("reset"));
86 | #endif
87 |
88 | state = STOPPED;
89 | startTimestamp = 0;
90 | stopTimestamp = 0;
91 | accumulator = 0;
92 | }
93 |
94 | millis_t Stopwatch::duration() {
95 | return ((isRunning() ? millis() : stopTimestamp)
96 | - startTimestamp) / 1000UL + accumulator;
97 | }
98 |
99 | #if ENABLED(DEBUG_STOPWATCH)
100 |
101 | void Stopwatch::debug(const char func[]) {
102 | if (DEBUGGING(INFO)) {
103 | SERIAL_ECHOPGM("Stopwatch::");
104 | serialprintPGM(func);
105 | SERIAL_ECHOLNPGM("()");
106 | }
107 | }
108 |
109 | #endif
110 |
--------------------------------------------------------------------------------
/Marlin/pins_GEN3_MONOLITHIC.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Gen3 Monolithic Electronics pin assignments
25 | */
26 |
27 | /**
28 | * Rev B 26 DEC 2016
29 | *
30 | * added pointer to a current Arduino IDE extension
31 | *
32 | */
33 |
34 | /**
35 | * A useable Arduino IDE extension (board manager) can be found at
36 | * https://github.com/Lauszus/Sanguino
37 | *
38 | * This extension has been tested on Arduino 1.6.12 & 1.8.0
39 | *
40 | * Here's the JSON path:
41 | * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42 | *
43 | * When installing select 1.0.2
44 | *
45 | * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46 | * Just use the above JSON URL instead of Sparkfun's JSON.
47 | *
48 | * Once installed select the Sanguino board and then select the CPU.
49 | *
50 | */
51 |
52 | #ifndef __AVR_ATmega644P__
53 | #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
54 | #endif
55 |
56 | #define BOARD_NAME "Gen3 Monolithic"
57 | #define DEBUG_PIN 0
58 |
59 | //
60 | // Limit Switches
61 | //
62 | #define X_STOP_PIN 20
63 | #define Y_STOP_PIN 25
64 | #define Z_STOP_PIN 30
65 |
66 | //
67 | // Steppers
68 | //
69 | #define X_STEP_PIN 15
70 | #define X_DIR_PIN 18
71 | #define X_ENABLE_PIN 24 // actually uses Y_enable_pin
72 |
73 | #define Y_STEP_PIN 23
74 | #define Y_DIR_PIN 22
75 | #define Y_ENABLE_PIN 24 // shared with X_enable_pin
76 |
77 | #define Z_STEP_PIN 27
78 | #define Z_DIR_PIN 28
79 | #define Z_ENABLE_PIN 29
80 |
81 | #define E0_STEP_PIN 12
82 | #define E0_DIR_PIN 17
83 | #define E0_ENABLE_PIN 3
84 |
85 | //
86 | // Temperature Sensors
87 | //
88 | #define TEMP_0_PIN 0 // Analog Input
89 |
90 | //
91 | // Heaters
92 | //
93 | #define HEATER_0_PIN 16
94 |
95 | //
96 | // Misc. Functions
97 | //
98 | #define PS_ON_PIN 14 // Alex, does this work on the card?
99 |
100 | // Alex extras from Gen3+
101 |
--------------------------------------------------------------------------------
/Marlin/pins_GEN3_PLUS.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * Gen3+ pin assignments
25 | */
26 |
27 | /**
28 | * Rev B 26 DEC 2016
29 | *
30 | * added pointer to a current Arduino IDE extension
31 | *
32 | */
33 |
34 | /**
35 | * A useable Arduino IDE extension (board manager) can be found at
36 | * https://github.com/Lauszus/Sanguino
37 | *
38 | * This extension has been tested on Arduino 1.6.12 & 1.8.0
39 | *
40 | * Here's the JSON path:
41 | * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42 | *
43 | * When installing select 1.0.2
44 | *
45 | * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46 | * Just use the above JSON URL instead of Sparkfun's JSON.
47 | *
48 | * Once installed select the SANGUINO board and then select the CPU.
49 | *
50 | */
51 |
52 |
53 | #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
54 | #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
55 | #endif
56 |
57 | #define BOARD_NAME "Gen3+"
58 |
59 | //
60 | // Limit Switches
61 | //
62 | #define X_STOP_PIN 20
63 | #define Y_STOP_PIN 25
64 | #define Z_STOP_PIN 30
65 |
66 | //
67 | // Steppers
68 | //
69 | #define X_STEP_PIN 15
70 | #define X_DIR_PIN 18
71 | #define X_ENABLE_PIN 19
72 |
73 | #define Y_STEP_PIN 23
74 | #define Y_DIR_PIN 22
75 | #define Y_ENABLE_PIN 24
76 |
77 | #define Z_STEP_PIN 27
78 | #define Z_DIR_PIN 28
79 | #define Z_ENABLE_PIN 29
80 |
81 | #define E0_STEP_PIN 17
82 | #define E0_DIR_PIN 21
83 | #define E0_ENABLE_PIN 13
84 |
85 | //
86 | // Temperature Sensors
87 | //
88 | #define TEMP_0_PIN 0 // Analog Input (pin 33 extruder)
89 | #define TEMP_BED_PIN 5 // Analog Input (pin 34 bed)
90 |
91 | //
92 | // Heaters
93 | //
94 | #define HEATER_0_PIN 12
95 | #define HEATER_BED_PIN 16
96 |
97 | //
98 | // Misc. Functions
99 | //
100 | #define SDSS 4
101 | #define PS_ON_PIN 14
102 |
--------------------------------------------------------------------------------
/Marlin/pins_AZTEEG_X3.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | /**
24 | * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
25 | */
26 |
27 | #ifndef __AVR_ATmega2560__
28 | #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
29 | #endif
30 |
31 | #if HOTENDS > 2 || E_STEPPERS > 2
32 | #error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue."
33 | #endif
34 |
35 | #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT)
36 | #define CASE_LIGHT_PIN 6 // Define before RAMPS pins include
37 | #endif
38 | #define BOARD_NAME "Azteeg X3"
39 |
40 | #include "pins_RAMPS_13.h"
41 |
42 | //
43 | // Servos
44 | //
45 | #undef SERVO0_PIN
46 | #undef SERVO1_PIN
47 | #define SERVO0_PIN 44 // SERVO1 port
48 | #define SERVO1_PIN 55 // SERVO2 port
49 |
50 | //
51 | // LCD / Controller
52 | //
53 | #undef STAT_LED_RED_PIN
54 | #undef STAT_LED_BLUE_PIN
55 |
56 | #if ENABLED(VIKI2) || ENABLED(miniVIKI)
57 |
58 | #undef DOGLCD_A0
59 | #undef DOGLCD_CS
60 | #undef BTN_ENC
61 | #define DOGLCD_A0 31
62 | #define DOGLCD_CS 32
63 | #define BTN_ENC 12
64 |
65 | #define STAT_LED_RED_PIN 64
66 | #define STAT_LED_BLUE_PIN 63
67 |
68 | #else
69 |
70 | #define STAT_LED_RED_PIN 6
71 | #define STAT_LED_BLUE_PIN 11
72 |
73 | #endif
74 |
75 | //
76 | // Misc
77 | //
78 | #if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && PIN_EXISTS(STAT_LED_RED) && STAT_LED_RED_PIN == CASE_LIGHT_PIN
79 | #undef STAT_LED_RED_PIN
80 | #endif
81 |
82 | //
83 | // M3/M4/M5 - Spindle/Laser Control
84 | //
85 | #undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are no good with the AzteegX3 board
86 | #undef SPINDLE_LASER_ENABLE_PIN
87 | #undef SPINDLE_DIR_PIN
88 |
89 | #if ENABLED(SPINDLE_LASER_ENABLE)
90 | #undef SDA // use EXP3 header
91 | #undef SCL
92 | #if SERVO0_PIN == 7
93 | #undef SERVO0_PIN
94 | #define SERVO0_PIN 11
95 | #endif
96 | #define SPINDLE_LASER_PWM_PIN 7 // MUST BE HARDWARE PWM
97 | #define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup!
98 | #define SPINDLE_DIR_PIN 21
99 | #endif
100 |
--------------------------------------------------------------------------------
/Marlin/nozzle.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Marlin 3D Printer Firmware
3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 | *
5 | * Based on Sprinter and grbl.
6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *
21 | */
22 |
23 | #ifndef __NOZZLE_H__
24 | #define __NOZZLE_H__
25 |
26 | #include "Marlin.h"
27 | #include "point_t.h"
28 |
29 | /**
30 | * @brief Nozzle class
31 | *
32 | * @todo: Do not ignore the end.z value and allow XYZ movements
33 | */
34 | class Nozzle {
35 | private:
36 |
37 | #if ENABLED(NOZZLE_CLEAN_FEATURE)
38 |
39 | /**
40 | * @brief Stroke clean pattern
41 | * @details Wipes the nozzle back and forth in a linear movement
42 | *
43 | * @param start point_t defining the starting point
44 | * @param end point_t defining the ending point
45 | * @param strokes number of strokes to execute
46 | */
47 | static void stroke(const point_t &start, const point_t &end, const uint8_t &strokes) _Os;
48 |
49 | /**
50 | * @brief Zig-zag clean pattern
51 | * @details Apply a zig-zag cleaning pattern
52 | *
53 | * @param start point_t defining the starting point
54 | * @param end point_t defining the ending point
55 | * @param strokes number of strokes to execute
56 | * @param objects number of objects to create
57 | */
58 | static void zigzag(const point_t &start, const point_t &end, const uint8_t &strokes, const uint8_t &objects) _Os;
59 |
60 | /**
61 | * @brief Circular clean pattern
62 | * @details Apply a circular cleaning pattern
63 | *
64 | * @param start point_t defining the middle of circle
65 | * @param strokes number of strokes to execute
66 | * @param radius radius of circle
67 | */
68 | static void circle(const point_t &start, const point_t &middle, const uint8_t &strokes, const float &radius) _Os;
69 |
70 | #endif // NOZZLE_CLEAN_FEATURE
71 |
72 | public:
73 |
74 | #if ENABLED(NOZZLE_CLEAN_FEATURE)
75 |
76 | /**
77 | * @brief Clean the nozzle
78 | * @details Starts the selected clean procedure pattern
79 | *
80 | * @param pattern one of the available patterns
81 | * @param argument depends on the cleaning pattern
82 | */
83 | static void clean(const uint8_t &pattern, const uint8_t &strokes, const float &radius, const uint8_t &objects=0) _Os;
84 |
85 | #endif // NOZZLE_CLEAN_FEATURE
86 |
87 | #if ENABLED(NOZZLE_PARK_FEATURE)
88 |
89 | static void park(const uint8_t &z_action, const point_t &park=NOZZLE_PARK_POINT) _Os;
90 |
91 | #endif
92 | };
93 |
94 | #endif // __NOZZLE_H__
95 |
--------------------------------------------------------------------------------