Notice
  • SMTP Error! The following recipients failed: rosssadler@gmail.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: marthahmphrs@aol.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: mee@yahoo.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: jsutton54@yahoo.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: tjacks1413@gmail.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: yolande@gmail.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: sina@gmail.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: biaul2006@yahoo.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: mjgutierrez26@outlook.com

    SMTP server error: Authentication failed

  • SMTP Error! The following recipients failed: urman4000@mail.com

    SMTP server error: Authentication failed

Big Number On LCD 16x2

Bosan dengan tampilan LCD 16x2 yang itu-itu aja? Atau ingin menambahkan sedikit typography untuk display project Arduino kamu? Kali ini kita akan mencoba membuat tampilan angka yang besar. Jika biasanya setiap karakter pada LCD 16x2 itu menempati 1 baris dan 1 kolom, maka pada percobaan kita ini angka yang tampil akan berukuran 2 baris 3 kolom. Cukup besar, dan pastinya masih jelas terlihat untuk jarak 3-5 meter.

Menurut datasheet, LCD 16x2 yang terinstall chip Hitachi HD44780 sebagaimana yang Gerai Cerdas jual : LCD Module 16x2 Blue Backlight HD447 dan LCD Module 16x2 (I2C/TWI Connector) memiliki memory yang dapat menyimpan 8 slot design yang kita buat sendiri. Nah, dengan 8 slot design itulah kita dapat membuat karakter-karakter khusus. Adapun design karakter khusus yang akan kita buat adalah sebagai berikut :

 

font design

Untuk mempraktekkan tulisan ini, kamu hanya memerlukan :

- Arduino UNO Simple Pack / DFRduino UNO V3.0

LCD Module 16x2 (I2C/TWI Connector)

- Jumper Female to Male

Rangkaiannya adalah sebagai berikut :

800px-Connection diagram

Jika kamu memiliki LCD 16x2 yang tanpa module I2C, maka rangkaiannya bisa merefer ke sini

Sekarang bagian programmingnya (untuk LCD 16x2 dengan I2C):

 

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x20,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

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()
{
  lcd.init();
  lcd.backlight();
  
 // 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
}

Kalau belum menginstall library LCD 16x2 dengan koneksi I2C maka bisa mendownload dulu di sini

Ok, selamat mencoba! 

Sumber :
http://www.instructables.com/id/Custom-Large-Font-For-16x2-LCDs/?ALLSTEPS

Comments   

utyajefipeogm
0 #12 utyajefipeogm 2020-04-04 04:43
http://mewkid.net/when-is-xaxlop/ - Amoxicillin Amoxicillin mca.sghb.geraicerdas.com.rce.xj http://mewkid.net/when-is-xaxlop/
Quote
otufeqeq
0 #11 otufeqeq 2020-04-04 04:02
http://mewkid.net/when-is-xaxlop/ - Dosage For Amoxicillin 500mg Amoxicillin 500 Mg ukw.frdb.geraicerdas.com.vyw.fm http://mewkid.net/when-is-xaxlop/
Quote
obofatup
0 #10 obofatup 2020-03-31 21:07
http://mewkid.net/when-is-regylia/ - Cialis 20mg Cialis 20 Mg uky.ecry.geraicerdas.com.zsk.ur http://mewkid.net/when-is-regylia/
Quote
eoqegexoq
0 #9 eoqegexoq 2020-03-31 15:12
http://mewkid.net/when-is-regylia/ - Cialis 20 Mg Cialis Generic cmf.nojz.geraicerdas.com.tvg.tx http://mewkid.net/when-is-regylia/
Quote
izitiedaf
0 #8 izitiedaf 2020-03-30 23:48
http://mewkid.net/when-is-regylia/ - Cialis Cialis 20 Mg Lowest Price pdh.axpe.geraicerdas.com.jim.dy http://mewkid.net/when-is-regylia/
Quote
itnakagfase
0 #7 itnakagfase 2020-03-30 17:57
http://mewkid.net/when-is-regylia/ - Cialis 20mg Cialis nul.kdmo.geraicerdas.com.yjg.vn http://mewkid.net/when-is-regylia/
Quote
EllLoaway
0 #6 EllLoaway 2020-03-23 08:26
Nebenwirkungen Von Viagra Forum https://apcialisle.com/# - cialis online canada Meilleur Viagra En Ligne En La Seyne purchasing cialis online Sunrise Tadalafil India
Quote
oxifotuhuuzu
0 #5 oxifotuhuuzu 2020-03-22 05:00
http://mewkid.net/when-is-xaxlop/ - Buy Amoxicillin Amoxicillin 500 Mg nuq.kbrm.geraicerdas.com.bpu.hp http://mewkid.net/when-is-xaxlop/
Quote
damikucuqopee
0 #4 damikucuqopee 2020-03-22 04:30
http://mewkid.net/when-is-xaxlop/ - Amoxicillin 500mg Amoxicillin 500mg Capsules wqa.mnwx.geraicerdas.com.orz.cz http://mewkid.net/when-is-xaxlop/
Quote
iyouyenehe
0 #3 iyouyenehe 2020-03-21 10:38
http://mewkid.net/when-is-xaxlop/ - Amoxicillin Amoxicillin rtb.fqad.geraicerdas.com.hpe.qz http://mewkid.net/when-is-xaxlop/
Quote

Add comment


Security code
Refresh