LCD1602 KEYPAD SHIELD

  • Hãng sản xuất : Chính hãng
  • Mã sản phẩm : R115
  • Tình trạng : Có sẵn
Giá bán: 64.000₫


LCD1602 KEYPAD SHIELD

.LCD1602 KEYPAD SHIELD

Code test : 

#include <LCD4Bit_mod.h>

LCD4Bit_mod lcd = LCD4Bit_mod (2);

GP2D12 char; 

char A, B; 

char str1 [] = "Renge:"; 

char str2 [] = "Renge Over"; 

char Str3 [] = "cm & lt";

Void set () 

  lcd.init (); 

  lcd.clear (); 

  lcd.printIn ("GP2D12 testing ...");  

}

Loop void () 

      GP2D12 read_gp2d12_range = (. 1); 

      IF (GP2D12> 80 || GP2D12 <10) 

        { 

          lcd.cursorTo (2,0);  

          lcd.printIn (str2);      

        } 

      the else 

        { 

          A = 0x30 + GP2D12 / 10 ; 

          B = 0x30 + 10% GP2D12;           

          lcd.cursorTo (2,. 3);  

          lcd.printIn (str1);     

          lcd.print (A);     

          lcd.print (B); 

          lcd.printIn (Str3);                     

        }     

    Delay (50 ); 

}

read_gp2d12_range a float (byte PIN)

{

int tmp;

tmp = analogRead (PIN);

IF (tmp<3) return -1;

return (6787.0/ ((a float) tmp - 3.0)) - 4.0;

 

 

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.