MD, USA
Offline
God Member
Karma: 2
Posts: 663
A jack of all trades and a master of none!
|
 |
« on: February 09, 2010, 01:19:03 am » |
This isn't the first time this has been done. I'm sure the code has allot to be desired but it works. I found this link for a similar project. http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1245352653For one thing i didn't like the style of his numbers. Sure i could change the code used theer but i didn't understand how it all worked. My coding experience is quite limited at this point. So i decided to do my own more simplistic version. I used the LiquidCrystal library's ability to create a custom character. Its limited to 8 5x8 characters. So i create 8 segments that are used to build large numbers using 2 lines on a 16x2 LCD. Here is what they look like when put together.    The sketch i built has the numbers counting from 0 to 9 and then it keeps track of the number of program loops on the left in regular text/numbers. Then a reconfigured that sketch so it would display the numbers as seen in the pictures. But i'll post the code to the first one. /* A set of custom made large numbers for a 16x2 LCD using the LiquidCrystal librabry. Works with displays compatible with the Hitachi HD44780 driver.
The Cuicuit: LCD RS pin to D12 LCD Enable pin to D11 LCD D4 pin to D5 LCD D5 pin to D4 LCD D6 pin to D3 LCD D7 pin to D2 LCD Vee tied to a pot to control brightness LCD Vss and R/W tied to ground LCD Vcc to +5V LCD pin 15 tied to pushbutton for control of backlight This code has the custum numbers counting from 0 to 9 on the left hand side of the LCD with a 1 sec delay between numbers. On the right is a counter tracking the number of times the program has looped. Made by Michael Pilcher 2/9/2010 */
// include the library #include <LiquidCrystal.h>
// initialize the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// the 8 arrays that form each segment of the custom numbers byte LT[8] = { B00111, B01111, B11111, B11111, B11111, B11111, B11111, B11111 }; byte UB[8] = { B11111, B11111, B11111, B00000, B00000, B00000, B00000, B00000 }; byte RT[8] = { B11100, B11110, B11111, B11111, B11111, B11111, B11111, B11111 }; byte LL[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B01111, B00111 }; byte LB[8] = { B00000, B00000, B00000, B00000, B00000, B11111, B11111, B11111 }; byte LR[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B11110, B11100 }; byte MB[8] = { B11111, B11111, B11111, B00000, B00000, B00000, B11111, B11111 }; byte block[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111 };
// loop counter int count = 0; void setup() { // assignes each segment a write number lcd.createChar(0,LT); lcd.createChar(1,UB); lcd.createChar(2,RT); lcd.createChar(3,LL); lcd.createChar(4,LB); lcd.createChar(5,LR); lcd.createChar(6,MB); lcd.createChar(7,block); // sets the LCD's rows and colums: lcd.begin(16, 2); }
void custom0() { // uses segments to build the number 0 lcd.setCursor(0,0); // set cursor to column 0, line 0 (first row) lcd.write(0); // call each segment to create lcd.write(1); // top half of the number lcd.write(2); lcd.setCursor(0, 1); // set cursor to colum 0, line 1 (second row) lcd.write(3); // call each segment to create lcd.write(4); // bottom half of the number lcd.write(5); }
void custom1() { lcd.setCursor(0,0); lcd.write(1); lcd.write(2); lcd.setCursor(0,1); lcd.write(4); lcd.write(7); lcd.write(4); }
void custom2() { lcd.setCursor(0,0); lcd.write(6); lcd.write(6); lcd.write(2); lcd.setCursor(0, 1); lcd.write(3); lcd.write(4); lcd.write(4); }
void custom3() { lcd.setCursor(0,0); lcd.write(6); lcd.write(6); lcd.write(2); lcd.setCursor(0, 1); lcd.write(4); lcd.write(4); lcd.write(5); }
void custom4() { lcd.setCursor(0,0); lcd.write(3); lcd.write(4); lcd.write(7); lcd.setCursor(2, 1); lcd.write(7); }
void custom5() { lcd.setCursor(0,0); lcd.write(3); lcd.write(6); lcd.write(6); lcd.setCursor(0, 1); lcd.write(4); lcd.write(4); lcd.write(5); }
void custom6() { lcd.setCursor(0,0); lcd.write(0); lcd.write(6); lcd.write(6); lcd.setCursor(0, 1); lcd.write(3); lcd.write(4); lcd.write(5); }
void custom7() { lcd.setCursor(0,0); lcd.write(1); lcd.write(1); lcd.write(2); lcd.setCursor(2, 1); lcd.write(7); }
void custom8() { lcd.setCursor(0,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(0, 1); lcd.write(3); lcd.write(4); lcd.write(5); }
void custom9() { lcd.setCursor(0,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(2, 1); lcd.write(7); }
void clearnumber() { // clears the area the custom number is displayed in lcd.setCursor(0,0); lcd.print(" "); lcd.setCursor(0,1); lcd.print(" "); }
void loop() { lcd.setCursor(5,0); // puts cursor at columb 5, line 0 lcd.print("Loop Count:"); // displays the words on LCD lcd.setCursor(9,1); // sets cursor to column 9, line 1 lcd.print(count); // displays loop count on LCD clearnumber(); // clears the custom number custom0(); // displays custom 0 on the LCD delay(1000); // delay 1 second clearnumber(); custom1(); delay(1000); clearnumber(); custom2(); delay(1000); clearnumber(); custom3(); delay(1000); clearnumber(); custom4(); delay(1000); clearnumber(); custom5(); delay(1000); clearnumber(); custom6(); delay(1000); clearnumber(); custom7(); delay(1000); clearnumber(); custom8(); delay(1000); clearnumber(); custom9(); delay(1000); count++; // adds 1 to the loop count }
|
|
|
|
« Last Edit: February 09, 2010, 02:19:58 pm by digimike »
|
Logged
|
|
|
|
|
Norway
Offline
Sr. Member
Karma: 0
Posts: 370
R-Doo-Inoo in the making :3
|
 |
« Reply #1 on: February 09, 2010, 01:24:54 am » |
looks nice  i should give it a go.. would be nice to have this type of numbers on a display for things :3
|
|
|
|
|
Logged
|
B-dui in creation.
|
|
|
|
MD, USA
Offline
God Member
Karma: 2
Posts: 663
A jack of all trades and a master of none!
|
 |
« Reply #2 on: February 09, 2010, 01:46:17 am » |
Thanks Bongmaster, I always do this. I think i have something finalized and i go and make changes. I changed the 7 so that the bottom segment is in the middle. Changed the 5 so that the upper left segment has the curve on the upper left corner. I took the to small bars on the 1 off. I also replaced all of the full bar segments with ones with the corners cut. Now there is a new segment to help the numbers look more balanced. 9 still looks a bit off but you can't win them all. So i guess i'll use this opportunity to post the code i used for the pictures. Modified as stated above, of course. /* A set of custom made large numbers for a 16x2 LCD using the LiquidCrystal librabry. Works with displays compatible with the Hitachi HD44780 driver.
The Cuicuit: LCD RS pin to D12 LCD Enable pin to D11 LCD D4 pin to D5 LCD D5 pin to D4 LCD D6 pin to D3 LCD D7 pin to D2 LCD Vee tied to a pot to control brightness LCD Vss and R/W tied to ground LCD Vcc to +5V LCD pin 15 tied to pushbutton for control of backlight Made by Michael Pilcher 2/9/2010 */
// include the library #include <LiquidCrystal.h>
// initialize the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// the 8 arrays that form each segment of the custom numbers byte LT[8] = { B00111, B01111, B11111, B11111, B11111, B11111, B11111, B11111 }; byte UB[8] = { B11111, B11111, B11111, B00000, B00000, B00000, B00000, B00000 }; byte RT[8] = { B11100, B11110, B11111, B11111, B11111, B11111, B11111, B11111 }; byte LL[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B01111, B00111 }; byte LB[8] = { B00000, B00000, B00000, B00000, B00000, B11111, B11111, B11111 }; byte LR[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B11110, B11100 }; byte UMB[8] = { B11111, B11111, B11111, B00000, B00000, B00000, B11111, B11111 }; byte LMB[8] = { B11111, B00000, B00000, B00000, B00000, B11111, B11111, B11111 };
// loop counter int x = 0;
void setup() { // assignes each segment a write number lcd.createChar(0,LT); lcd.createChar(1,UB); lcd.createChar(2,RT); lcd.createChar(3,LL); lcd.createChar(4,LB); lcd.createChar(5,LR); lcd.createChar(6,UMB); lcd.createChar(7,LMB); // sets the LCD's rows and colums: lcd.begin(16, 2); }
void custom0() { // uses segments to build the number 0 lcd.setCursor(x, 0); // set cursor to column 0, line 0 (first row) lcd.write(0); // call each segment to create lcd.write(1); // top half of the number lcd.write(2); lcd.setCursor(x, 1); // set cursor to colum 0, line 1 (second row) lcd.write(3); // call each segment to create lcd.write(4); // bottom half of the number lcd.write(5); }
void custom1() { lcd.setCursor(x,0); lcd.write(1); lcd.write(2); lcd.setCursor(x+1,1); lcd.write(5); }
void custom2() { lcd.setCursor(x,0); lcd.write(6); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.write(7); lcd.write(7); }
void custom3() { lcd.setCursor(x,0); lcd.write(6); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(7); lcd.write(7); lcd.write(5); }
void custom4() { lcd.setCursor(x,0); lcd.write(3); lcd.write(4); lcd.write(2); lcd.setCursor(x+2, 1); lcd.write(5); }
void custom5() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(6); lcd.setCursor(x, 1); lcd.write(7); lcd.write(7); lcd.write(5); }
void custom6() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(6); lcd.setCursor(x, 1); lcd.write(3); lcd.write(7); lcd.write(5); }
void custom7() { lcd.setCursor(x,0); lcd.write(1); lcd.write(1); lcd.write(2); lcd.setCursor(x+1, 1); lcd.write(0); }
void custom8() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.write(7); lcd.write(5); }
void custom9() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(x+2, 1); lcd.write(5); }
void loop() { custom0(); // displays custom 0 on the LCD x = x + 4; // sifts cursor over 4 columns custom1(); x = x + 4; custom2(); x = x + 4; custom3(); delay(4000); // delay 4 seconds lcd.clear(); // clears the display x = 0; // resets x to 0 custom4(); x = x + 4; custom5(); x = x + 4; custom6(); x = x + 4; custom7(); delay(4000); lcd.clear(); x = 0; custom8(); x = x + 4; custom9(); delay(4000); lcd.clear(); x = 0; }
|
|
|
|
|
Logged
|
|
|
|
|
Austria
Offline
Sr. Member
Karma: 3
Posts: 261
Arduino rocks
|
 |
« Reply #3 on: February 09, 2010, 03:29:27 am » |
Hello, im always looking for new "fonts" and this ones are realy nice! 
|
|
|
|
|
Logged
|
|
|
|
|
North Yorkshire, UK
Offline
Faraday Member
Karma: 104
Posts: 5531
|
 |
« Reply #4 on: February 09, 2010, 03:39:10 am » |
Unfortunately I do not have a 16x2 LCD but I will the font on my 40x4 when I get home tonight. I need to get round to making myself a w line font soon.
Are you going to do alphanumeric characters? I might have a go if I have the time. I suppose on a 16x2 you don't have enough custom characters to be able to do things like R and Q though...
Mowcius
|
|
|
|
« Last Edit: February 09, 2010, 03:39:30 am by mowcius »
|
Logged
|
|
|
|
|
MD, USA
Offline
God Member
Karma: 2
Posts: 663
A jack of all trades and a master of none!
|
 |
« Reply #5 on: February 09, 2010, 09:18:43 am » |
I've been thinking about that but only having 8 custom characters to work with keeps things limited. If there was a way to flip the character horizontally and vertically then it could be possible. Then then i would only need 3 custom segments to handle the numbers.
Maybe i need to come up with a way i could redefine the characters on the fly. Like having multiple versions of the setup that can be called too to redefine the available segments.
|
|
|
|
|
Logged
|
|
|
|
|
Mobile, AL
Offline
Sr. Member
Karma: 0
Posts: 314
CAUTION!-Slow Learner
|
 |
« Reply #6 on: February 09, 2010, 09:47:51 am » |
That is slick Mike - and can see a couple of places I'd like to use that... but would like the letter "F" displayed also in thermometer type displays.... GREAT WORK!
Thanks for posting the info.
Ken H>
|
|
|
|
|
Logged
|
|
|
|
|
MD, USA
Offline
God Member
Karma: 2
Posts: 663
A jack of all trades and a master of none!
|
 |
« Reply #7 on: February 09, 2010, 10:00:35 am » |
F and C are easy enough. void customF() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(6); lcd.setCursor(x, 1); lcd.write(3); }
void customC() { lcd.setCursor(x,0); lcd.write(0); lcd.write(1); lcd.write(1); lcd.setCursor(x,1); lcd.write(3); lcd.write(4); lcd.write(4); }
|
|
|
|
« Last Edit: February 09, 2010, 10:02:42 am by digimike »
|
Logged
|
|
|
|
|
UK
Offline
Faraday Member
Karma: 15
Posts: 2852
Gorm deficient
|
 |
« Reply #8 on: February 09, 2010, 10:09:30 am » |
For themometers, can you do a 'K'?
|
|
|
|
|
Logged
|
Per Arduino ad Astra
|
|
|
|
MD, USA
Offline
God Member
Karma: 2
Posts: 663
A jack of all trades and a master of none!
|
 |
« Reply #9 on: February 09, 2010, 10:15:30 am » |
Here is a K. void customK() { lcd.setCursor(x,0); lcd.write(0); lcd.write(4); lcd.write(5); lcd.setCursor(x,1); lcd.write(3); lcd.write(1); lcd.write(2); } Or you can do it like this so it doesn't look so bulky. void customK() { lcd.setCursor(x,0); lcd.write(0); lcd.write(4); lcd.write(5); lcd.setCursor(x,1); lcd.write(3); lcd.print(" "); lcd.write(2); } For the hell of it i'm sure you could come up with a 'U' on your own. lol EDIT: In case anyone wants it here is 'M' 'P' and 'H'. just keep in mind that the 'M' takes up 5 columns vs. the 3 that all the others take. void customM() { lcd.setCursor(x,0); lcd.write(0); lcd.write(1); lcd.write(3); lcd.write(1); lcd.write(2); lcd.setCursor(x,1); lcd.write(3); lcd.print(" "); lcd.write(5); }
void customP() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); }
void customH() { lcd.setCursor(x,0); lcd.write(0); lcd.write(4); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.print(" "); lcd.write(5); }
|
|
|
|
« Last Edit: February 09, 2010, 10:33:27 am by digimike »
|
Logged
|
|
|
|
|
Mobile, AL
Offline
Sr. Member
Karma: 0
Posts: 314
CAUTION!-Slow Learner
|
 |
« Reply #10 on: February 09, 2010, 01:06:35 pm » |
Shucks Mike - now you've done gone and done it! Made it so I will have to work on that to get a thermometer displaying these large fonts. I won't have time just now, but will be saving this thread for study in a week or so.
Thanks for your work.
Ken H.
|
|
|
|
|
Logged
|
|
|
|
|
MD, USA
Offline
God Member
Karma: 2
Posts: 663
A jack of all trades and a master of none!
|
 |
« Reply #11 on: February 09, 2010, 01:22:22 pm » |
I suppose on a 16x2 you don't have enough custom characters to be able to do things like R and Q though...
Been thinking on this and i think i have 'R' and 'Q" figured out. The big problem i see is with 'N', 'M', and 'W" taking up so many columns. But the full alphabet is doable with these segments. void customR() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(5); lcd.setCursor(x,1); lcd.write(3); lcd.print(" "); lcd.write(2); }
void customQ() { lcd.setCursor(x,0); lcd.write(0); lcd.write(1); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.write(4); lcd.write(3); lcd.write(4); } Should have the full alphabet done by the end of the day. That is if i can remember to bring the code with me to work.
|
|
|
|
« Last Edit: February 09, 2010, 01:50:45 pm by digimike »
|
Logged
|
|
|
|
|
MD, USA
Offline
God Member
Karma: 2
Posts: 663
A jack of all trades and a master of none!
|
 |
« Reply #12 on: February 09, 2010, 02:09:21 pm » |
Here it is. Full code for a large custom alphanumeric display taking up 2 lines of a 16x2 or larger LCD display. The code displays all the letters and numbers. /* A set of custom made large numbers for a 16x2 LCD using the LiquidCrystal librabry. Works with displays compatible with the Hitachi HD44780 driver. The Cuicuit: LCD RS pin to D12 LCD Enable pin to D11 LCD D4 pin to D5 LCD D5 pin to D4 LCD D6 pin to D3 LCD D7 pin to D2 LCD Vee tied to a pot to control brightness LCD Vss and R/W tied to ground LCD Vcc to +5V LCD pin 15 tied to pushbutton for control of backlight Made by Michael Pilcher 2/9/2010 */
// include the library #include <LiquidCrystal.h>
// initialize the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int x = 0; // the 8 arrays that form each segment of the custom numbers byte LT[8] = { B00111, B01111, B11111, B11111, B11111, B11111, B11111, B11111 }; byte UB[8] = { B11111, B11111, B11111, B00000, B00000, B00000, B00000, B00000 }; byte RT[8] = { B11100, B11110, B11111, B11111, B11111, B11111, B11111, B11111 }; byte LL[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B01111, B00111 }; byte LB[8] = { B00000, B00000, B00000, B00000, B00000, B11111, B11111, B11111 }; byte LR[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B11110, B11100 }; byte UMB[8] = { B11111, B11111, B11111, B00000, B00000, B00000, B11111, B11111 }; byte LMB[8] = { B11111, B00000, B00000, B00000, B00000, B11111, B11111, B11111 };
void setup() { // assignes each segment a write number lcd.createChar(0,LT); lcd.createChar(1,UB); lcd.createChar(2,RT); lcd.createChar(3,LL); lcd.createChar(4,LB); lcd.createChar(5,LR); lcd.createChar(6,UMB); lcd.createChar(7,LMB);
// sets the LCD's rows and colums: lcd.begin(16, 2);
}
void custom0O() { // uses segments to build the number 0 lcd.setCursor(x, 0); lcd.write(0); lcd.write(1); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.write(4); lcd.write(5); }
void custom1() { lcd.setCursor(x,0); lcd.write(1); lcd.write(2); lcd.setCursor(x+1,1); lcd.write(5); }
void custom2() { lcd.setCursor(x,0); lcd.write(6); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.write(7); lcd.write(7); }
void custom3() { lcd.setCursor(x,0); lcd.write(6); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(7); lcd.write(7); lcd.write(5); }
void custom4() { lcd.setCursor(x,0); lcd.write(3); lcd.write(4); lcd.write(2); lcd.setCursor(x+2, 1); lcd.write(5); }
void custom5S() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(6); lcd.setCursor(x, 1); lcd.write(7); lcd.write(7); lcd.write(5); }
void custom6() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(6); lcd.setCursor(x, 1); lcd.write(3); lcd.write(7); lcd.write(5); }
void custom7() { lcd.setCursor(x,0); lcd.write(1); lcd.write(1); lcd.write(2); lcd.setCursor(x+1, 1); lcd.write(0); }
void custom8() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.write(7); lcd.write(5); }
void custom9() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(x+2, 1); lcd.write(5); }
void customA() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.print(" "); lcd.write(5); }
void customB() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(5); lcd.setCursor(x, 1); lcd.write(3); lcd.write(7); lcd.write(2); }
void customC() { lcd.setCursor(x,0); lcd.write(0); lcd.write(1); lcd.write(1); lcd.setCursor(x,1); lcd.write(3); lcd.write(4); lcd.write(4); }
void customD() { lcd.setCursor(x, 0); lcd.write(2); lcd.write(1); lcd.write(2); lcd.setCursor(x, 1); lcd.write(5); lcd.write(4); lcd.write(5); }
void customE() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(6); lcd.setCursor(x, 1); lcd.write(3); lcd.write(7); lcd.write(7); }
void customF() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(6); lcd.setCursor(x, 1); lcd.write(3); }
void customG() { lcd.setCursor(x,0); lcd.write(0); lcd.write(1); lcd.write(1); lcd.setCursor(x,1); lcd.write(3); lcd.write(4); lcd.write(2); }
void customH() { lcd.setCursor(x,0); lcd.write(0); lcd.write(4); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.print(" "); lcd.write(5); }
void customI() { lcd.setCursor(x,0); lcd.write(1); lcd.write(2); lcd.write(1); lcd.setCursor(x,1); lcd.write(4); lcd.write(5); lcd.write(4); }
void customJ() { lcd.setCursor(x+2,0); lcd.write(2); lcd.setCursor(x,1); lcd.write(4); lcd.write(4); lcd.write(5); }
void customK() { lcd.setCursor(x,0); lcd.write(0); lcd.write(4); lcd.write(5); lcd.setCursor(x,1); lcd.write(3); lcd.print(" "); lcd.write(2); }
void customL() { lcd.setCursor(x,0); lcd.write(0); lcd.setCursor(x,1); lcd.write(3); lcd.write(4); lcd.write(4); }
void customM() { lcd.setCursor(x,0); lcd.write(0); lcd.write(1); lcd.write(3); lcd.write(1); lcd.write(2); lcd.setCursor(x,1); lcd.write(3); lcd.print(" "); lcd.write(5); }
void customN() { lcd.setCursor(x,0); lcd.write(0); lcd.write(3); lcd.print(" "); lcd.write(2); lcd.setCursor(x,1); lcd.write(3); lcd.print(" "); lcd.write(2); lcd.write(5); }
void customP() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); }
void customQ() { lcd.setCursor(x,0); lcd.write(0); lcd.write(1); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.write(4); lcd.write(3); lcd.write(4); }
void customR() { lcd.setCursor(x,0); lcd.write(0); lcd.write(6); lcd.write(5); lcd.setCursor(x,1); lcd.write(3); lcd.print(" "); lcd.write(2); }
void customT() { lcd.setCursor(x,0); lcd.write(1); lcd.write(2); lcd.write(1); lcd.setCursor(x,1); lcd.print(" "); lcd.write(5); }
void customU() { lcd.setCursor(x, 0); lcd.write(0); lcd.print(" "); lcd.write(2); lcd.setCursor(x, 1); lcd.write(3); lcd.write(4); lcd.write(5); }
void customV() { lcd.setCursor(x, 0); lcd.write(3); lcd.print(" "); lcd.write(5); lcd.setCursor(x+1, 1); lcd.write(3); lcd.write(5); }
void customW() { lcd.setCursor(x,0); lcd.write(0); lcd.print(" "); lcd.write(2); lcd.setCursor(x,1); lcd.write(3); lcd.write(4); lcd.write(0); lcd.write(4); lcd.write(5); }
void customX() { lcd.setCursor(x,0); lcd.write(3); lcd.write(4); lcd.write(5); lcd.setCursor(x,1); lcd.write(0); lcd.print(" "); lcd.write(2); }
void customY() { lcd.setCursor(x,0); lcd.write(3); lcd.write(4); lcd.write(5); lcd.setCursor(x+1,1); lcd.write(5); }
void customZ() { lcd.setCursor(x,0); lcd.write(1); lcd.write(6); lcd.write(5); lcd.setCursor(x, 1); lcd.write(0); lcd.write(7); lcd.write(4); }
void loop() { customA(); x = x + 4; customB(); x = x + 4; customC(); x = x + 4; customD(); delay(4000); // delay 4 seconds lcd.clear(); // clears the display x = 0; // resets x to 0 customE(); x = x + 4; customF(); x = x + 4; customG(); x = x + 4; customH(); delay(4000); // delay 4 seconds lcd.clear(); // clears the display x = 0; // resets x to 0 customI(); x = x + 4; customJ(); x = x + 4; customK(); x = x + 4; customL(); delay(4000); lcd.clear(); x = 0; customM(); x = x + 6; customN(); x = x + 5; custom0O(); delay(4000); lcd.clear(); x = 0; customP(); x = x + 4; customQ(); x = x + 5; customR(); x = x + 4; custom5S(); delay(4000); lcd.clear(); x = 0; customT(); x = x + 4; customU(); x = x + 4; customV(); delay(4000); lcd.clear(); x = 0; customW(); x = x + 6; customX(); delay(4000); lcd.clear(); x = 0; customY(); x = x + 4; customZ(); delay(4000); lcd.clear(); x = 0; custom0O(); // displays custom 0 on the LCD x = x + 4; // sifts cursor over 4 columns custom1(); x = x + 4; custom2(); x = x + 4; custom3(); delay(4000); lcd.clear(); x = 0; custom4(); x = x + 4; custom5S(); x = x + 4; custom6(); x = x + 4; custom7(); delay(4000); lcd.clear(); x = 0; custom8(); x = x + 4; custom9(); delay(4000); lcd.clear(); x = 0; }
Enjoy! EDIT: update 'N' and 'V' to look better.
|
|
|
|
« Last Edit: February 09, 2010, 02:19:10 pm by digimike »
|
Logged
|
|
|
|
|
MD, USA
Offline
God Member
Karma: 2
Posts: 663
A jack of all trades and a master of none!
|
 |
« Reply #13 on: February 09, 2010, 03:01:17 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
North Yorkshire, UK
Offline
Faraday Member
Karma: 104
Posts: 5531
|
 |
« Reply #14 on: February 10, 2010, 03:46:19 am » |
They look nice. I've been thinking about that but only having 8 custom characters to work with keeps things limited. If there was a way to flip the character horizontally and vertically then it could be possible. Then then i would only need 3 custom segments to handle the numbers.
Maybe i need to come up with a way i could redefine the characters on the fly. Like having multiple versions of the setup that can be called too to redefine the available segments. You can redefine on the fly can you not. Call a code section to redifine and it should be simple enough. Mowcius
|
|
|
|
|
Logged
|
|
|
|
|
|