collapse

Welcome!



Welcome to Robot Rebels, an online robot maker community.

Register today to post your projects, ask questions, share knowledge and meet like-minded people from around the world.


The RobotRebel.org Community

Author Topic: customising marlin GLCD  (Read 7196 times)

jinx

  • calling from free Europe
  • Moderator
  • Sr. Member
  • *****
  • Posts: 469
customising marlin GLCD
« on: October 04, 2016, 12:50:39 PM »
                 

                 Theres a few things you can do to customise marlin having a image splash screen  to a warm greeting, the latter the easiest to start open marlin  in the IDE navigate to the file version.h file , "when marlin first starts its the text  in this file that appears under  the  marlin logo"
the first line I changed 'this appears  on the top line of the  default splash screen.
Code: [Select]
#define SHORT_BUILD_VERSION " Welcome jinx "   #line 38
 appears after bootup
Code: [Select]
#define MACHINE_NAME "jinx Printer is"     #line 71
 this is the second line of the default 
Code: [Select]
#define SOURCE_CODE_URL "PRINTER IS STARTING"  #line 79
and that the simplest fudging around there is  to personalise  your printer screen!!
next though is more involved and fun creating  your own splash screen. first you need a image/drawer package  I used MSpaint.net but anything that can do black and white image will do. thanks to Killer Angel  for those links at the bottom of the post.
 vid:

 first Marlin : marling RC7 doesn't come with a boot screen file by default but have a peek  in the example files hephestos 2, in there is the file _BOOTSCREEN, copy and paste that file into your master marlin file "where the rest of the files are".
next open the IDE and open the config.h and uncomment #line 105.
Code: [Select]
#define SHOW_CUSTOM_BOOTSCREENNext open the BOOTSCREEN.h its a small file with a couple of option screen size and duration  but below that is the Array,
Code: [Select]
const unsigned char custom_start_bmp[512] PROGMEM = { delete
everything in-between
};
delete everything in between those brackets and replace with your array or test out the rebel logo below.

       

 
                             Creating your own splash screen.
     Now you cant go just throwing colourful Jpeg into marlin or an arduino the image needs to be converted into an array of hex, there's a few web based imagetohex convertors like the one over at marlin.org but for this small example I use  two  free software first and straight forward to use is LCD assistant  this converts the  bitmap image created by paint.net .
  using the LCD ass. is straight forward enough load the image and save the output , which is where  you go  and open that exported file using  notepad  there you see the array  that you simply copy and past into marlin .



          As mentioned earlier you need an image editor I opted for paint.net  to prepare the image and for best results start by converting an image into a simple monochrome. " black and white with clear distinction between boarders and be able to scale to within 60 pixels " note we working with pixels and not mm/cm once you start scaling  your image  down to that size  you  need that image editor  to touch up those lost lines!.
 
first step create a template:


click file > new you presented with a small config window here we set the size of the  screen dimension height and width which we set in Marlin bootscreen.

next we need to open the tool panel 'on the  top right hand side see an hammer icon click that the tool bar open.

in the tool bar is a magic wand  click that and then click on the small white panel you created next on the left hand side under the image tab is the scissor icon  click that  and it removes the background of the box leaving a chequered box, your template is ready grab the pencil and start drawing!.
    "its important to remove the plain white background  as the lcd assistant will spit out garbage"
 BESURE to save your work of art in bitmap " BMP .bmp as the lcd assistant  only want bitmap

                                         BACK TO MARLIN!
to use the whole screen you need to modify  the bootscreen.h file in marlin 
Code: [Select]
#define CUSTOM_BOOTSCREEN_TIMEOUT   2500
#define CUSTOM_BOOTSCREEN_BMPWIDTH  128
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64

const unsigned char custom_start_bmp[1024] PROGMEM = {

thanks to Roxy-3D over at marlin github for the follow tip bit :
64x128 is 8192 pixels. Each char of that array can hold 8 pixels. So, that array needs to be defined as
Code: [Select]
const unsigned char [1024];
in order to have enough space to hold the logo. Specifically:

Code: [Select]
const unsigned char custom_start_bmp[1024] PROGMEM = {
  0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00,
...
  0x00, 0x07, 0xe0, 0x07, 0xe0, 0x0f, 0xc0, 0x00,
  0x00, 0x0f, 0xf0, 0x03, 0xc0, 0x1f, 0xe0, 0x00};

                happy printing Jinx.




Code: [Select]
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x07, 0xff, 0xff, 0xe0, 0x00, 0x00,
  0x00, 0x00, 0x1f, 0xff, 0xff, 0xf8, 0x00, 0x00,
  0x00, 0x00, 0x3f, 0xff, 0xff, 0xfe, 0x00, 0x00,
  0x00, 0x00, 0xff, 0xe3, 0xc3, 0xff, 0x00, 0x00,
  0x00, 0x01, 0xff, 0xe3, 0xc3, 0xff, 0x80, 0x00,
  0x00, 0x07, 0xf9, 0xe1, 0xc7, 0x8f, 0xe0, 0x00,
  0x00, 0x0f, 0xf0, 0x80, 0x00, 0x87, 0xf0, 0x00,
  0x00, 0x1f, 0xf0, 0x00, 0x00, 0x0f, 0xf8, 0x00,
  0x00, 0x3f, 0xf0, 0x00, 0x00, 0x0f, 0xfc, 0x00,
  0x00, 0x3e, 0x70, 0x00, 0x00, 0x07, 0x7e, 0x00,
  0x00, 0x7c, 0x20, 0x00, 0x00, 0x02, 0x3e, 0x00,
  0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00,
  0x00, 0xfe, 0x00, 0x04, 0x00, 0x00, 0x3f, 0x80,
  0x01, 0xfe, 0x00, 0x0e, 0x00, 0x00, 0x7f, 0xc0,
  0x01, 0xfc, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0xc0,
  0x03, 0xe4, 0x00, 0x3f, 0x80, 0x00, 0x33, 0xe0,
  0x03, 0xc0, 0x00, 0x3f, 0x70, 0x00, 0x03, 0xe0,
  0x07, 0xc0, 0x00, 0x3e, 0xfc, 0x00, 0x01, 0xe0,
  0x07, 0xe0, 0x01, 0xce, 0xfc, 0x00, 0x03, 0xf0,
  0x0f, 0xf0, 0x03, 0xf1, 0xfc, 0x00, 0x07, 0xf0,
  0x0f, 0xf0, 0x07, 0xfc, 0xfb, 0x80, 0x07, 0xf0,
  0x0f, 0xe0, 0x07, 0xff, 0x7b, 0xc0, 0x03, 0xf0,
  0x0f, 0x00, 0x0f, 0xff, 0xb7, 0xe0, 0x00, 0xf0,
  0x0f, 0x00, 0x0f, 0xff, 0xb7, 0xe0, 0x00, 0x70,
  0x0f, 0x00, 0x1f, 0xff, 0x8f, 0xf8, 0x00, 0x70,
  0x0f, 0xc0, 0x1f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 0x00,
  0x00, 0x07, 0xf0, 0xff, 0xff, 0x8f, 0xf0, 0x00,
  0x00, 0x03, 0xf9, 0xff, 0xff, 0xdf, 0xc0, 0x00,
  0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00,
  0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
  0x00, 0x00, 0x3f, 0xff, 0xff, 0xfe, 0x00, 0x00,
  0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00,
  0x00, 0x00, 0x01, 0xff, 0xff, 0x80, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,







links :
"KA provided links to what looks like a nice software for cleaning and creating screens with bitmap2LCD"..

image Editors:
gimp
http://www.gimp.org/
made for GLCD fun
http://bitmap2lcd.com/index.html

image to hex " web based
http://www.digole.com/tools/PicturetoC_Hex_converter.php

http://www.marlinfw.org/tools/u8glib/converter.html


« Last Edit: October 07, 2016, 02:38:46 AM by jinx »
I build bots

viswesh

  • Member
  • ****
  • Posts: 58
    • opamps sensors audio amplifier
Re: customising marlin GLCD
« Reply #1 on: October 05, 2016, 11:46:58 AM »
really cool jinx, I will try once i have graphic display thing.
How much resolution of the source picture it can handle ?

cool :p

jinx

  • calling from free Europe
  • Moderator
  • Sr. Member
  • *****
  • Posts: 469
Re: customising marlin GLCD
« Reply #2 on: October 05, 2016, 03:50:50 PM »
resolution!! its monochrome without depth..
 128x64.  64 horizontal lines and each line has 128 pixels, being monochromatic the pixel either ON or OFF and there aint no shading in between
I build bots

bdk6

  • Guest
Re: customising marlin GLCD
« Reply #3 on: October 05, 2016, 04:18:54 PM »
An awful lot can be done with monochrome.  Not only did many expensive, UNIX based, graphical workstations in the 80s use monochrome, but so did this...
https://scratch.mit.edu/projects/22964385/

ossipee

  • Member
  • *
  • o
  • Posts: 86
Re: customising marlin GLCD
« Reply #4 on: November 02, 2016, 02:23:55 PM »
I like it jinx, will play with it this week.

 

* Search


* Recent Topics

Coding a Nano i2c Slave by AmandaG
[June 11, 2019, 02:48:03 PM]


repetierHost 2.1.6 not working? by MEgg
[June 09, 2019, 03:11:34 PM]


Servo Calibrator by Bajdi
[May 24, 2019, 04:01:10 AM]


MKS Gen L 1.0 by Bappi
[May 21, 2019, 07:22:54 PM]


ESP32 "Life is Life" 64x32 flexible P4 RGB LED by jinx
[May 18, 2019, 11:19:44 AM]


Warco HV-4" Rotary Table by jinx
[May 08, 2019, 03:12:58 PM]


Warco WM14 milling machine by jinx
[April 28, 2019, 09:41:40 AM]


MKS GEN L Servo Issue by Reywas
[April 22, 2019, 09:10:08 PM]


Meowth Abandoned by Nemesis
[April 11, 2019, 11:08:00 AM]


Bench Power: Help a rebel out by jinx
[April 03, 2019, 04:20:10 AM]


Just a short intro... by MEgg
[March 18, 2019, 05:49:28 PM]


Yes I am alive! by jinx
[March 10, 2019, 04:38:53 AM]


CZ-1 2.0: problems, calibration and printing, part2 by MEgg
[February 26, 2019, 03:35:15 PM]


Hi, Mushroom glue here. by nschreiber0813
[February 25, 2019, 02:09:13 PM]


Arduino IK by BaldwinK
[February 25, 2019, 05:54:44 AM]

* Recent Posts

Re: Coding a Nano i2c Slave by AmandaG
[June 11, 2019, 02:48:03 PM]


repetierHost 2.1.6 not working? by MEgg
[June 09, 2019, 03:11:34 PM]


Re: Servo Calibrator by Bajdi
[May 24, 2019, 04:01:10 AM]


Re: Servo Calibrator by jinx
[May 22, 2019, 02:28:13 AM]


Re: MKS Gen L 1.0 by Bappi
[May 21, 2019, 07:22:54 PM]


Re: MKS Gen L 1.0 by jinx
[May 21, 2019, 03:27:08 PM]


Re: MKS Gen L 1.0 by Bappi
[May 21, 2019, 03:11:45 PM]


Servo Calibrator by BaldwinK
[May 21, 2019, 10:20:42 AM]


Re: MKS Gen L 1.0 by jinx
[May 21, 2019, 05:09:27 AM]


Re: MKS Gen L 1.0 by Bappi
[May 21, 2019, 03:34:54 AM]


Re: MKS Gen L 1.0 by jinx
[May 21, 2019, 02:28:17 AM]


Re: MKS Gen L 1.0 by Bappi
[May 20, 2019, 07:11:31 PM]


Re: MKS Gen L 1.0 by jinx
[May 20, 2019, 03:16:02 PM]


Re: MKS Gen L 1.0 by Bappi
[May 20, 2019, 02:53:00 PM]


Re: MKS Gen L 1.0 by jinx
[May 20, 2019, 03:31:49 AM]