buzkill420 / LaserShark

Firmware for using a Laser with Tech cooling on a CNC/3D Printer. Forked from Marlin 1.1.9.1
3 stars 1 forks source link

Trying to compile for Creality Melzi board #8

Closed Jeroentjj closed 3 years ago

Jeroentjj commented 3 years ago

Great project! I am trying to compile a version for my spare creality v1.1.4 Melzi board but I am running into issues. When I copy the marlin 1.1.9.1 config files over to the LaserShark folder I get the following errors:

sketch\Marlin_main.cpp: In function 'void setup()':

Marlin_main.cpp:15222:7: error: 'TCCR4B' was not declared in this scope

       TCCR4B &= ~myEraser;

       ^~~~~~

sketch\Marlin_main.cpp:15222:7: note: suggested alternative: 'TCCR0B'

       TCCR4B &= ~myEraser;

       ^~~~~~

       TCCR0B

exit status 1
'TCCR4B' was not declared in this scope

After trying to compile again I get the following

sketch\ultralcd.cpp: In function 'void lcd_prepare_menu()':

ultralcd.cpp:2733:20: error: 'ARMED_PIN' was not declared in this scope

     if(digitalRead(ARMED_PIN) == LOW){

                    ^~~~~~~~~

sketch\ultralcd.cpp:2733:20: note: suggested alternative: 'LED_PIN'

     if(digitalRead(ARMED_PIN) == LOW){

                    ^~~~~~~~~

                    LED_PIN

ultralcd.cpp:2738:21: error: 'ARMED_PIN' was not declared in this scope

     if (digitalRead(ARMED_PIN) == HIGH) MENU_MULTIPLIER_ITEM_EDIT(int3, "Laser Power", &fanSpeeds[1], 0, 255);   //only if laser is armed will you see laser power option

                     ^~~~~~~~~

sketch\ultralcd.cpp:2738:21: note: suggested alternative: 'LED_PIN'

     if (digitalRead(ARMED_PIN) == HIGH) MENU_MULTIPLIER_ITEM_EDIT(int3, "Laser Power", &fanSpeeds[1], 0, 255);   //only if laser is armed will you see laser power option

                     ^~~~~~~~~

                     LED_PIN

sketch\ultralcd.cpp: In function 'void _air_pump()':

ultralcd.cpp:3527:8: error: 'air_assist' was not declared in this scope

    if (air_assist == true && fanSpeeds[1] > 0 )digitalWrite(PUMP_PIN, HIGH);

        ^~~~~~~~~~

ultralcd.cpp:3527:61: error: 'PUMP_PIN' was not declared in this scope

    if (air_assist == true && fanSpeeds[1] > 0 )digitalWrite(PUMP_PIN, HIGH);

                                                             ^~~~~~~~

sketch\ultralcd.cpp:3527:61: note: suggested alternative: 'PB5_PIN'

    if (air_assist == true && fanSpeeds[1] > 0 )digitalWrite(PUMP_PIN, HIGH);

                                                             ^~~~~~~~

                                                             PB5_PIN

ultralcd.cpp:3528:67: error: 'PUMP_PIN' was not declared in this scope

    else if (air_assist == false || fanSpeeds[1] == 0)digitalWrite(PUMP_PIN, LOW);

                                                                   ^~~~~~~~

sketch\ultralcd.cpp:3528:67: note: suggested alternative: 'PB5_PIN'

    else if (air_assist == false || fanSpeeds[1] == 0)digitalWrite(PUMP_PIN, LOW);

                                                                   ^~~~~~~~

                                                                   PB5_PIN

sketch\Marlin_main.cpp: In function 'void setup()':

Marlin_main.cpp:15222:7: error: 'TCCR4B' was not declared in this scope

       TCCR4B &= ~myEraser;

       ^~~~~~

sketch\Marlin_main.cpp:15222:7: note: suggested alternative: 'TCCR0B'

       TCCR4B &= ~myEraser;

       ^~~~~~

       TCCR0B

exit status 1
'ARMED_PIN' was not declared in this scope

Any help to get this up and running would be appreciated!

buzkill420 commented 3 years ago

Great project! I am trying to compile a version for my spare creality v1.1.4 Melzi board but I am running into issues. When I copy the marlin 1.1.9.1 config files over to the LaserShark folder I get the following errors:

sketch\Marlin_main.cpp: In function 'void setup()':

Marlin_main.cpp:15222:7: error: 'TCCR4B' was not declared in this scope

       TCCR4B &= ~myEraser;

       ^~~~~~

sketch\Marlin_main.cpp:15222:7: note: suggested alternative: 'TCCR0B'

       TCCR4B &= ~myEraser;

       ^~~~~~

       TCCR0B

exit status 1
'TCCR4B' was not declared in this scope

After trying to compile again I get the following

sketch\ultralcd.cpp: In function 'void lcd_prepare_menu()':

ultralcd.cpp:2733:20: error: 'ARMED_PIN' was not declared in this scope

     if(digitalRead(ARMED_PIN) == LOW){

                    ^~~~~~~~~

sketch\ultralcd.cpp:2733:20: note: suggested alternative: 'LED_PIN'

     if(digitalRead(ARMED_PIN) == LOW){

                    ^~~~~~~~~

                    LED_PIN

ultralcd.cpp:2738:21: error: 'ARMED_PIN' was not declared in this scope

     if (digitalRead(ARMED_PIN) == HIGH) MENU_MULTIPLIER_ITEM_EDIT(int3, "Laser Power", &fanSpeeds[1], 0, 255);   //only if laser is armed will you see laser power option

                     ^~~~~~~~~

sketch\ultralcd.cpp:2738:21: note: suggested alternative: 'LED_PIN'

     if (digitalRead(ARMED_PIN) == HIGH) MENU_MULTIPLIER_ITEM_EDIT(int3, "Laser Power", &fanSpeeds[1], 0, 255);   //only if laser is armed will you see laser power option

                     ^~~~~~~~~

                     LED_PIN

sketch\ultralcd.cpp: In function 'void _air_pump()':

ultralcd.cpp:3527:8: error: 'air_assist' was not declared in this scope

    if (air_assist == true && fanSpeeds[1] > 0 )digitalWrite(PUMP_PIN, HIGH);

        ^~~~~~~~~~

ultralcd.cpp:3527:61: error: 'PUMP_PIN' was not declared in this scope

    if (air_assist == true && fanSpeeds[1] > 0 )digitalWrite(PUMP_PIN, HIGH);

                                                             ^~~~~~~~

sketch\ultralcd.cpp:3527:61: note: suggested alternative: 'PB5_PIN'

    if (air_assist == true && fanSpeeds[1] > 0 )digitalWrite(PUMP_PIN, HIGH);

                                                             ^~~~~~~~

                                                             PB5_PIN

ultralcd.cpp:3528:67: error: 'PUMP_PIN' was not declared in this scope

    else if (air_assist == false || fanSpeeds[1] == 0)digitalWrite(PUMP_PIN, LOW);

                                                                   ^~~~~~~~

sketch\ultralcd.cpp:3528:67: note: suggested alternative: 'PB5_PIN'

    else if (air_assist == false || fanSpeeds[1] == 0)digitalWrite(PUMP_PIN, LOW);

                                                                   ^~~~~~~~

                                                                   PB5_PIN

sketch\Marlin_main.cpp: In function 'void setup()':

Marlin_main.cpp:15222:7: error: 'TCCR4B' was not declared in this scope

       TCCR4B &= ~myEraser;

       ^~~~~~

sketch\Marlin_main.cpp:15222:7: note: suggested alternative: 'TCCR0B'

       TCCR4B &= ~myEraser;

       ^~~~~~

       TCCR0B

exit status 1
'ARMED_PIN' was not declared in this scope

Any help to get this up and running would be appreciated!

Did you manage to get it to work? Closed now... anyways, i did not write this to work with anything other then ramps 1.4. You would have to modify for your board

Jeroentjj commented 3 years ago

I didn't, but i closed as I figured that this might not work for me as I ordered one of the pwm lasers for 3D printers. Still looking for a solution though.

buzkill420 commented 3 years ago

I didn't, but i closed as I figured that this might not work for me as I ordered one of the pwm lasers for 3D printers. Still looking for a solution though.

This is meant for pwm laser. Doesn't matter the brand. But to be honest, I've been slacking on this project and it's actuality outdated anyways (marlin 2.0 has come out and handles laser's much better now just stock) i am planning on porting this over to the newer marlIn, but for now i would recommend trying to use that. Sorry for your troubles! And good luck!

Jeroentjj commented 3 years ago

Ah alright! I will look into compiling marlin 2.0 for my project. Do you have any pointers where to make changes so to get the laser menu etc?

buzkill420 commented 3 years ago

Ah alright! I will look into compiling marlin 2.0 for my project. Do you have any pointers where to make changes so to get the laser menu etc?

Its all in the configuration.h and configuration_adv.h