confused smiley Marlin Code ändern (custom Printer)
September 04, 2024 07:52AM
Hello everyone,

This is my first message on here.
I am repairing a Rep Rap printer from 2013. I have attached a few pictures of it.
I know quite a bit about hotend endstops and other "mechanical" parts of printers, but when it comes to software I am a complete nobe.
I needed to add new endstops, an LCD display, more fans and a new hotend, which meant changing the software.
I downloaded the latest version of Marlin and worked on it litteraly nights, but it does not compile at all and gives me the error #if without #endif.
There are also some parts of the code that I am not really sure about, like the accelleration or the correct calibration of the theremistors.
This made me think if I could just change some things in the old software of the printer so that I do not have to set it up completely new.
So is there a way to extract the software from the printer right now and change a few things in it?

I do not know what to do.
Please let me know.

By Paul
Attachments:
open | download - IMG-20240904-WA0001.jpg (191.3 KB)
open | download - IMG-20240904-WA0002.jpg (156.8 KB)
open | download - IMG-20240904-WA0003.jpg (119.5 KB)
open | download - IMG-20240904-WA0005.jpg (107.3 KB)
open | download - IMG-20240904-WA0007.jpg (207 KB)
open | download - IMG-20240904-WA0008.jpg (130.5 KB)
open | download - IMG-20240904-WA0009.jpg (134.1 KB)
open | download - IMG-20240904-WA0010.jpg (151.2 KB)
open | download - IMG-20240904-WA0012.jpg (156.4 KB)
open | download - IMG-20240904-WA0013.jpg (130.8 KB)
Re: confused smiley Marlin Code ändern (custom Printer)
September 04, 2024 07:56AM
you cannot extract settings from firmware binary

while running you can get it to tell you some basic stuff with gcode M503

Edited 1 time(s). Last edit at 09/04/2024 08:02AM by Dust.
Re: confused smiley Marlin Code ändern (custom Printer)
September 04, 2024 08:22AM
re #if without #endif.

In config files do not delete or edit or comment out any line starting with #if or #endif



#if and #endif come in pairs, the error says there is at least one more #if than #endif

Edited 1 time(s). Last edit at 09/04/2024 09:18AM by Dust.
Re: confused smiley Marlin Code ändern (custom Printer)
September 04, 2024 03:57PM
Ok thanks that helped me a lotspinning smiley sticking its tongue out but now there is another compile error about u8glib but I downloaded it from here: [github.com]
And also in Arduini Ide under Librarys.
and put it unpacked in the sketch folder.yawning smiley

Here is the error message:

C:\Users\pauls\OneDrive\Desktop\Marlin2\Marlin\src\HAL\AVR\u8g_com_HAL_AVR_sw_spi.cpp:65:10: fatal error: U8glib-HAL.h: No such file or directory
#include
^~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: U8glib-HAL.h: No such file or directory

Do you have anny idea why this error is caused?confused smiley
Re: confused smiley Marlin Code ändern (custom Printer)
September 04, 2024 08:42PM
Don't use Arduino IDE

Use vscode with platformio.

It's 100 x faster and it get all the required libraries you need for you.

[marlinfw.org]

Also dont use OneDrive, it messes with builds

Edited 1 time(s). Last edit at 09/05/2024 12:18AM by Dust.
Re: confused smiley Marlin Code ändern (custom Printer)
September 08, 2024 05:34AM
Okay, thanks,
Vscode is much faster and now everything works.
But I have two part cooling fans and I don't know how to configure them?
(I have the fan extension board attached for these).

Thanks again,
Paul Anton Schenker
Re: confused smiley Marlin Code ändern (custom Printer)
September 08, 2024 07:04AM
/**
 * Assign more PWM fans for part cooling, synchronized with Fan 0
 */
//#define REDUNDANT_PART_COOLING_FAN 1  // Index of the first fan to synchronize with Fan 0
#ifdef REDUNDANT_PART_COOLING_FAN
  //#define NUM_REDUNDANT_FANS 1        // Number of sequential fans to synchronize with Fan 0
#endif

enable this
and add something like
#define FAN1_PIN pin number...

I cannot remember what pin the fan expander uses but its either 11,6,5 or 4

Edited 1 time(s). Last edit at 09/08/2024 07:05AM by Dust.
Re: confused smiley Marlin Code ändern (custom Printer)
September 09, 2024 05:50PM
Oh okay, thanks again.
I think that work somehow fine, but as I think fan0 is set by default as the p.c. fan, so that should work, but via the LCD display only the redundant p.c. fan will start spinning if I turn the fan up under temperature, is that normal?
And will fan0 spin while printing as well as p.c. fan.

But my problem now is that when I turn x or z axis always the same motors start turning, the x axis motor and the right z motor from my to z axis.
So how can I change the software for my builded axis configuration, which you can see in my first message on this topic.

Good night.
Paul Anton Schenker
Sorry, only registered users may post in this forum.

Click here to login