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 5820 times)

jinx

  • calling from free Europe
  • Moderator
  • Sr. Member
  • *****
  • Posts: 447
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: 447
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

Web TIme API - by Gareth
[December 07, 2018, 04:34:37 PM]


API Directory by Gareth
[December 06, 2018, 03:34:16 PM]


The Original Prusa I3 Mk3 by tinhead
[November 30, 2018, 02:49:52 PM]


Email notifications by CraigCox
[November 28, 2018, 10:26:06 PM]


And another one. by CraigCox
[November 28, 2018, 10:17:54 PM]


MKS Gen L 1.0 by jinx
[November 28, 2018, 02:23:50 AM]


This kids a freaking genius by ossipee
[November 21, 2018, 04:55:40 PM]


Time of Flight >>> Rounded Corners !!! by Gareth
[November 15, 2018, 03:21:51 PM]


Double_ing up the "Time of Flight" sensors by Gareth
[November 13, 2018, 04:05:02 AM]


Point cloud anyone !!! maybe 3D scanner by maelh
[November 11, 2018, 05:38:33 AM]


removable magnetic print surface by Gareth
[November 09, 2018, 10:53:45 AM]


Robot Cop by Valeriex
[November 07, 2018, 05:48:20 AM]


it's lukeyes by Valeriex
[November 07, 2018, 05:47:16 AM]


TOF gets a local DEBUG screen by Gareth
[November 07, 2018, 03:47:29 AM]


BlueTooth elves choose "BlueTeeth" by Gareth
[November 07, 2018, 03:40:19 AM]

* Recent Posts

Web TIme API - by Gareth
[December 07, 2018, 04:34:37 PM]


API Directory by Gareth
[December 06, 2018, 03:34:16 PM]


Re: The Original Prusa I3 Mk3 by tinhead
[November 30, 2018, 02:49:52 PM]


Re: The Original Prusa I3 Mk3 by Bajdi
[November 30, 2018, 02:26:48 PM]


Re: The Original Prusa I3 Mk3 by tinhead
[November 30, 2018, 04:38:53 AM]


Re: Email notifications by CraigCox
[November 28, 2018, 10:26:06 PM]


Re: And another one. by CraigCox
[November 28, 2018, 10:17:54 PM]


Re: MKS Gen L 1.0 by jinx
[November 28, 2018, 02:23:50 AM]


Re: MKS Gen L 1.0 by Prokktor
[November 27, 2018, 08:35:38 AM]


Re: The Original Prusa I3 Mk3 by tinhead
[November 26, 2018, 02:42:26 PM]


Re: The Original Prusa I3 Mk3 by jinx
[November 26, 2018, 02:24:05 PM]


Re: The Original Prusa I3 Mk3 by Bajdi
[November 25, 2018, 07:54:21 AM]


Re: The Original Prusa I3 Mk3 by tinhead
[November 25, 2018, 06:11:22 AM]


Re: The Original Prusa I3 Mk3 by Bajdi
[November 25, 2018, 04:40:31 AM]


The Original Prusa I3 Mk3 by tinhead
[November 24, 2018, 12:02:51 PM]