งานที่9


9-1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
void setup()
{
  lcd.backlight();
  lcd.begin();//LiquidCrystal_I2C
}
void loop()
{
  lcd.setCursor(0,0);
  lcd.print("Hello LCD I2C");
  lcd.setCursor(0,1);
  lcd.print("Pattayatech");
}

9-2
#include <LiquidCrystal_I2C.h> 
LiquidCrystal_I2C lcd(0x27,16,2);
int x=48;
int y=-79;
float z=8.74586; 
void setup()
{
lcd.begin();
}
void loop() 
{
  lcd.setCursor(0,0);
  lcd.print("x = ");
  lcd.print(x);
  lcd.setCursor(8,0);
  lcd.print("y = ");
  lcd.print(y);
  lcd.setCursor(0,1);
  lcd.print("z = ");
  lcd.print(z,4);
}

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

https://www.arduitronics.com/article/22/arduino-and-motor-control-part-1

https://medium.com/sathittham/arduino-lcd-16x2-hello-world-dca09fd904f8

อธิบายโปรแกรมHow To Make Arduino Based Home Automation Project via Bluetooth