ความรู้แน่น ฟรีสำหรับชุมชน ArduinoAll ที่นี่เท่านั้น

ฟรีและดีที่สุด คอร์สอบรม Arduino + NodeMCU
ทำเพื่อแบ่งปัน ห้ามนำไปจำหน่าย หรือเก็บเงินค่าเรียน
  !!!


  


AllNewStep รับประกันคุณภาพทุกชิ้น วันจันทร์-ศุกร์แจ้งชำระสินค้าก่อน 14.00 จัดส่งทันทีวันนี้ค่ะ

กรุงเทพ /ภาคกลาง ได้พรุ่งนี้


*** สินค้าทุกชิ้น ถ้าสามารถทำรายการสั่งซื้อได้ แสดงว่ามีครบทุกรายการค่ะ *** 

พิมพ์ค้นหาบทความ หัวข้อกระทู้ และสินค้าในเว็บ AllNewStep ได้ที่นี่
QUOTE 

จอLCD I2Cมันออกแค่ตัวเดียว

บอส

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

// Set the LCD address to 0x27 for a 16 chars and 2 line display

LiquidCrystal_I2C lcd(0x27, 16, 2);

 

void setup()

{

// initialize the LCD

lcd.begin();

 

// Turn on the blacklight and print a message.

lcd.backlight();

lcd.print("Hello, world!");

}

 

void loop()

{

// Do nothing here...

}

ใช่บอร์ด arduino nano  วิธีต่อ GND เข้า GND

VCC ต่อเข้า5v

SDA ต่อเข้า A4

SCL ต่อเข้า A5

 

อักษรขึ้นตัวเดียวคับตัวH

QUOTE 
ความคิดเห็นที่ #1
Tama1580

ไม่แน่ใจ ลองเปลี่ยน Address ดู  ไม่แน่ใจว่าเกี่ยวใหม

1.   LiquidCrystal_I2C lcd(0x27, 16, 2); ===> LiquidCrystal_I2C lcd(0x3F, 16, 2); 

 

QUOTE 
ความคิดเห็นที่ #2
เจ้าของร้าน

รับประกันว่าออกทุกตัวครับ บอร์ดนี้เช็คทุกจุด ทุก pixel ก่อนส่ง ลองเช็คสายไฟ เช็คการต่อสาย ที่สำคัญคือเช็คโคดโปรแกรม โคดที่ใช้ทดลอง ตามตัวอย่างในบทความครับ http://www.arduinoall.com/b/20

QUOTE 
ความคิดเห็นที่ #3
weerasak99

ผมก็เป็นครับ งงเหมือนกัน ยังไม่รู้สาเหตุว่าเกิดจากอะไร

ไม่แน่ใจว่าจะเกี่ยวกับ Library หรือเปล่า

QUOTE 
ความคิดเห็นที่ #4
เจ้าของร้าน

เกียวครับอย่างที่ได้แนะนำไป ผมเทสให้ทุกตัวก่อนส่ง ใช้ได้แน่นอน 100% ครับ

QUOTE 
ความคิดเห็นที่ #5
บอส

ผมรู้แล้วคับว่ามันทำไม่ถึงขึ้นตัวเดียว ardino เวอร์1.6.6มันรันแล้วจะขึ้นแต่มันได้ทีละตัวทำให้เขียนยาวแต่ไม่รู้แก้ไขบัดตรงไหนแต่ โปรแกรม ardino เวอร์ 1.0.6 รันได้คับทุกตัวคับ

QUOTE 
ความคิดเห็นที่ #6
กิตติ
ของผมเป็น 1.8.3 ก็เป็นคือขึ้นตัวเดียว ครับ กำลังทดลองกลับไปใช้เวอร์ชั่นเก่าว่าเป็นหรือไม่
QUOTE 
ความคิดเห็นที่ #7
WesScience
เป็นไงบ้างครับ ผมยังไม่ได้เลย ตอนนี้ใช้ 1.8.3 เหมือนกัน
QUOTE 
ความคิดเห็นที่ #8
keng

ถ้าใช้ Arduino1.8.12 ต้องใช้ lib ตัวนี้http://www.mathertel.de/Arduino/LiquidCrystal_PCF8574.aspx

#include <LiquidCrystal_PCF8574.h>
#include <Wire.h>

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

int show = -1;

void setup()
{
int error;

Serial.begin(115200);
Serial.println("LCD...");

// wait on Serial to be available on Leonardo
while (!Serial)
;

Serial.println("Dose: check for LCD");

// See http://playground.arduino.cc/Main/I2cScanner how to test for a I2C device.
Wire.begin();
Wire.beginTransmission(0x27);
error = Wire.endTransmission();
Serial.print("Error: ");
Serial.print(error);

if (error == 0) {
Serial.println(": LCD found.");
show = 0;
lcd.begin(16, 2); // initialize the lcd

} else {
Serial.println(": LCD not found.");
} // if

} // setup()


void loop()
{
if (show == 0) {
lcd.setBacklight(255);
lcd.home();
lcd.clear();
lcd.print("Hello LCD");
delay(1000);

lcd.setBacklight(0);
delay(400);
lcd.setBacklight(255);

} else if (show == 1) {
lcd.clear();
lcd.print("Cursor On");
lcd.cursor();

} else if (show == 2) {
lcd.clear();
lcd.print("Cursor Blink");
lcd.blink();

} else if (show == 3) {
lcd.clear();
lcd.print("Cursor OFF");
lcd.noBlink();
lcd.noCursor();

} else if (show == 4) {
lcd.clear();
lcd.print("Display Off");
lcd.noDisplay();

} else if (show == 5) {
lcd.clear();
lcd.print("Display On");
lcd.setCursor(0, 1);
lcd.print("Panavara Resort");
lcd.display();

} else if (show == 7) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("*** first line.");
lcd.setCursor(0, 1);
lcd.print("*** second line.");

} else if (show == 8) {
lcd.scrollDisplayLeft();
} else if (show == 9) {
lcd.scrollDisplayLeft();
} else if (show == 10) {
lcd.scrollDisplayLeft();
} else if (show == 11) {
lcd.scrollDisplayRight();

} else if (show == 12) {
lcd.clear();
lcd.print("write-");

} else if (show > 12) {
lcd.print(show - 13);
} // if

delay(1400);
show = (show + 1) % 16;
} // loop()

แสดงความคิดเห็นที่ 1-8 จากทั้งหมด 8 ความคิดเห็น
ขาย ARDUINO
คุณภาพ อันดับ 1

ได้รับรางวัลร้านยอดเยี่ยม
ตั้งแต่ปี 2558
ขาย Arduino
วีดีโอสอน Arduino

สอน esp8266

สอน Arduino IoT
สอน Arduino แบบเร็ว

สอน NodeMCU

อุปกรณ์ Arduino

MEMBER ZONE

พูดคุย-สอบถาม