Witam mam problem z wyświetlaczem bo nie wyświetla wszystkiego tylko pierwsze litery
Kod:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init();
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(1,0);
lcd.print("my world");
lcd.setCursor(2,1);
lcd.print("Hello, world!");
delay(2000);
}
void loop()
{
}
Kod:
/*
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}
ustaw piny i spróbuj to czy ci wyświetla bo ten kod mi się nie podoba
ale ja potrzebuje z i2c
Dodam tylko ze mam najnowsza wersje
tak tylko chce wiedzieć czy nie jest to wina lcd
Przykładowy program wyświetla
)) ten z pisaniem w szeregowym monitorze
Nie , nie jest wina lcd w ardu 1.6.6 shiftreglcd też wyświetla tylko pierwsze 2 znaki niezależnie gdzie je umieścisz za pomocą lcd.setCursor . Właśnie zacząłem kopać po bibliotekach ale na razie nic z tego . Podłączony normalnie działa bez problemu .
(08-12-2015, 23:56)JasQ napisał(a): [ -> ]Nie , nie jest wina lcd w ardu 1.6.6 shiftreglcd też wyświetla tylko pierwsze 2 znaki niezależnie gdzie je umieścisz za pomocą lcd.setCursor . Właśnie zacząłem kopać po bibliotekach ale na razie nic z tego . Podłączony normalnie działa bez problemu .
To jaka wersje proponujesz do zabawy, która posiada najmniej bugów
1.5.8 mam i na razie najstabilniejsza
Zmieniłem program na ten co kolega polecił i nie ma najmniejszego problemu !