Jyers / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
http://marlinfw.org
GNU General Public License v3.0
2.14k stars 386 forks source link

LCD LED/NEOpixel menu #1950

Open Nbrooks639 opened 2 years ago

Nbrooks639 commented 2 years ago

Is it possible to add a menu in LCD to control LEDs or neopixels. is this possible yet? it has been used with other marlin builds currently. i am able to use the pixels with the firmware but am not able to control brightness or colors. start up test works, backlight works

Nbrooks639 commented 2 years ago

well sorry. good job on the take over.

ANTABY commented 2 years ago

first sorry for my english. I am trying to compile the neopixel leds, it is the only thing that I am missing to configure, I'm using the code new_feature, I undo the line #define NEOPIXEL_LED

and when I compile I get this error:

Marlin\src\lcd\e3v2\jyersui\dwin.cpp: In static member function 'static void CrealityDWINClass::Value_Control()': Marlin\src\lcd\e3v2\jyersui\dwin.cpp:6285:31: error: 'leds' was not declared in this scope 6285 | if ((valuepointer == &leds.color.r) || (valuepointer == &leds.color.g) || (valuepointer == &leds.color.b)) | ^~~~ Marlin\src\lcd\e3v2\jyersui\dwin.cpp:6286:11: error: 'ApplyLEDColor' was not declared in this scope 6286 | ApplyLEDColor(); | ^~~~~~~~~~~~~ Compiling .pio\build\STM32F103RE_creality\src\src\libs\buzzer.cpp.o Compiling .pio\build\STM32F103RE_creality\src\src\libs\crc16.cpp.o *** [.pio\build\STM32F103RE_creality\src\src\lcd\e3v2\jyersui\dwin.cpp.o] Error 1

` #if HAS_COLOR_LEDS if ((valuepointer == &leds.color.r) || (valuepointer == &leds.color.g) || (valuepointer == &leds.color.b)) ApplyLEDColor();

if HAS_WHITE_LED

        if (valuepointer == &leds.color.w) ApplyLEDColor();
      #endif

`

Any idea what is happening?

ANTABY commented 2 years ago

But when I uncomment it it doesn't even start compiling.

this is what it gives me,

` from buildroot/share/PlatformIO/scripts/common-dependencies.h:29: c:\firm\marlin-new_feature (1)\marlin-new_feature\marlin\src\feature\leds\neopixel.h:38:10: fatal error: Adafruit_NeoPixel.h: No such file or directory


ANTABY commented 2 years ago

thanks for answering. First of all I forgot to thank you for your excellent work, the truth is that I am very grateful for a piece of firmware, many of the options are very useful, if I cannot make the issue of the LEDs work, it would not be so serious either, which is a pity but not serious Regarding installing the library, I installed it before sending these messages and there is no case, I kept having the same problem, that's why I sent the question, after denying a lot I sent this message,

to guide me use this information

https://www.th3dstudio.com/hc/product-information/ezneo/ezneo-creality-v4-2-x-board-setup/

install the library by hand, install it with VScode, and there is no case I can't make it work. knowing at least that it is not a matter of firmware, I will continue to see where the problem may be, but the truth is that I have run out of ideas :(

install

install

ANTABY commented 2 years ago

@ANTABY Sé que desde la última actualización de Platformio, algunos tienen problemas inexplicables y otros no. Lo único que aún puede hacer es abrir Platformio.ini. Hay una línea que comienza con lib_deps =, agregue lo siguiente:adafruit/Adafruit NeoPixel@^1.10.4

https://docs.platformio.org/en/latest/projectconf/section_env_library.html?utm_source=platformio&utm_medium=piohome#lib-deps

Thank you very much for such a prompt response, I was just reading :P now i try hope it works https://docs.platformio.org/en/latest/projectconf/section_env_library.html?utm_source=platformio&utm_medium=piohome#lib-deps

ANTABY commented 2 years ago

well no, it doesn't want to load the library :( and it's where it needs to be and everything.

:( :(

ANTABY commented 2 years ago

@tititopher68-dev2 So far I haven't been able to get it to work. I'll uninstall everything tomorrow and do a clean install to see if I can get it to work. I will be commenting

ANTABY commented 2 years ago

I haven't had any luck, I've tried everything :O reinstall vscode, a clean installation of 0 unzipped the .rar and as I unzipped it enabled neopixel, and na, the library is installed, but when I compile

Processing STM32F103RE_creality (board: genericSTM32F103RE; platform: ststm32@~12.1; framework: arduino) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option In file included from c:\users\egma2\onedrive\desktop\probandoleds\marlin-new_feature\marlin\src\feature\leds\leds.h:39, from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../lcd/e3v2/jyersui/dwin_defines.h:31, from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:66, from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28, from buildroot/share/PlatformIO/scripts/common-dependencies.h:29: c:\users\egma2\onedrive\desktop\probandoleds\marlin-new_feature\marlin\src\feature\leds\neopixel.h:38:10: fatal error: Adafruit_NeoPixel.h: No such file or directory


Nbrooks639 commented 2 years ago

i also cannot get these to work, i have the exact same set up but keep getting the same build error

Nbrooks639 commented 2 years ago

thank you buddy. let me see

Nbrooks639 commented 2 years ago

nope not working

Nbrooks639 commented 2 years ago

image

Nbrooks639 commented 2 years ago

I use them on all three of my ender 3 s1s just not with this firmware. I like the firmware I just can't use my pixels with it

Nbrooks639 commented 2 years ago

same problem

Nbrooks639 commented 2 years ago

terminal says that the latest version of pixels are installed but it will not put it into the firmware. i even changed the neopixel led menu is the ui dwin.cpp to see if that helped. crazy i can compile another firmware with them all day long

Nbrooks639 commented 2 years ago

Haha o man that was my next option. Sweet thank you

Nbrooks639 commented 2 years ago

Now I have another request. Are you able to enable a touch screen via dgus/dwin set? Doesn't have to run jyers ui just normal functions. And it would not be the s1 pro screen. Ender 3 series touch, cr6 series touch. Theses are both dwin style touch screens

Nbrooks639 commented 2 years ago

now there is problems with the led menu image

Nbrooks639 commented 2 years ago

@ANTABY have you tried since he fixed this? i am able to have the pixels on but the menu option will not work

Nbrooks639 commented 2 years ago

The errors are in the ui menu nothing I would change. I trying to get the color menu on the printer screen so u can change the colors. I wouldn't be in the jyers ui changing commas, and semi colons and what not. Stm32f103re or stm32f103rc are the boards I use

Nbrooks639 commented 2 years ago

@tititopher68-dev2 I see you fixed. Thank you..

Nbrooks639 commented 2 years ago

I seen. Whoop whoooooop

Nbrooks639 commented 2 years ago

nope something still is not right it will not build

image

Nbrooks639 commented 2 years ago

image

Nbrooks639 commented 2 years ago

ok im trying it now

Nbrooks639 commented 2 years ago

image

Nbrooks639 commented 2 years ago

@tititopher68-dev2 i dont get what im doing wrong? i am not using a dacai lcd i use the old dwin set lcds idk if that helps i enable neopixels with pin set they work just fine, just the led menu option is config.h adv is what sets off the errors

Nbrooks639 commented 2 years ago

Wow your right I did the last time but this time I totally forgot

Nbrooks639 commented 2 years ago

alright i finally got it, thank you and sorry for all the trouble @tititopher68-dev2

Nbrooks639 commented 2 years ago

Yep all good. Working perfect get it gone

ANTABY commented 2 years ago

@Nbrooks639 @ANTABY ¡ Ahora está arreglado en new_feature ! No te olvides de definir un pin de Neopixel... ¡Soy yo! Lo siento ! Solo había eliminado la llamada redundante a un archivo de definición leds.h... Era tan grande como la nariz en el medio de la cara

Thank you very much, now I will try to see if it works. I tried by my means to find the problem for several days, until I gave up. I'm already downloading the latest version and let's try. Thanks for supporting the firmware.