LCD probléma
Re: LCD probléma
No I2C devices found
Re: LCD probléma
No I2C devices found
Re: LCD probléma
Az is lehet, hogy nem jó LiquidCrystal_I2C könyvtárat használok ...
Re: LCD probléma
Talán közben rájöttem ebből :
http://robotic-controls.com/learn/ardui ... 80-lcd2004
Board SDA SCL
Uno A4 A5
Mega2560 20 21
Leonardo 2 3
Due 20 21
ha jól értem nekem a PIN 2 és PIN3-ra kell kötnöm a soros illesztőt ?
http://robotic-controls.com/learn/ardui ... 80-lcd2004
Board SDA SCL
Uno A4 A5
Mega2560 20 21
Leonardo 2 3
Due 20 21
ha jól értem nekem a PIN 2 és PIN3-ra kell kötnöm a soros illesztőt ?
Re: LCD probléma
Igen. Mindenkepp az Scl/Sda labakra kell mennie!
Es az int0/int1 nem hasznalhato egyidejuleg!
Es az int0/int1 nem hasznalhato egyidejuleg!
http://www.tavir.hu - a gazda
Re: LCD probléma
Most hogy helyretettem a lábakat - a scanner 0x27-n lát illessztőt, de a probléma nem változotzt , mert csak a világító kockák vannak 2 sorban (.
Kód :
#include <Wire.h>
#include <LiquidCrystal.h>
#define I2C_ADDR 0x27 // Define I2C Address where the PCF8574A is
// Address can be changed by soldering A0, A1, or A2
// Default is 0x27
// map the pin configuration of LCD backpack for the LiquidCristal class
#define BACKLIGHT_PIN 3
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
LiquidCrystal lcd (I2C_ADDR,
En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin,
BACKLIGHT_PIN, POSITIVE);
void setup() {
lcd.begin(20,4); // 20 columns by 4 rows on display
lcd.setBacklight(HIGH); // Turn on backlight, LOW for off
lcd.setCursor ( 0, 0 ); // go to the top left corner
lcd.print("robotic-controls.com"); // write this string on the top row
lcd.setCursor ( 0, 1 ); // go to the 2nd row
lcd.print(" HD44780 / LCD2004 "); // pad string with spaces for centering
lcd.setCursor ( 0, 2 ); // go to the third row
lcd.print(" 20x4 i2c display "); // pad with spaces for centering
lcd.setCursor ( 0, 3 ); // go to the fourth row
lcd.print("Test increment: ");
}
int n = 1; // a global variable to track number of display refreshes
void loop() {
lcd.setCursor (16,3); // go to col 16 of the last row
lcd.print(n++,DEC); // update the display with a new number
// - overwrites previous characters
// - be sure new number is more digits
delay(500); // wait half a second before another update
}
Kód :
#include <Wire.h>
#include <LiquidCrystal.h>
#define I2C_ADDR 0x27 // Define I2C Address where the PCF8574A is
// Address can be changed by soldering A0, A1, or A2
// Default is 0x27
// map the pin configuration of LCD backpack for the LiquidCristal class
#define BACKLIGHT_PIN 3
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
LiquidCrystal lcd (I2C_ADDR,
En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin,
BACKLIGHT_PIN, POSITIVE);
void setup() {
lcd.begin(20,4); // 20 columns by 4 rows on display
lcd.setBacklight(HIGH); // Turn on backlight, LOW for off
lcd.setCursor ( 0, 0 ); // go to the top left corner
lcd.print("robotic-controls.com"); // write this string on the top row
lcd.setCursor ( 0, 1 ); // go to the 2nd row
lcd.print(" HD44780 / LCD2004 "); // pad string with spaces for centering
lcd.setCursor ( 0, 2 ); // go to the third row
lcd.print(" 20x4 i2c display "); // pad with spaces for centering
lcd.setCursor ( 0, 3 ); // go to the fourth row
lcd.print("Test increment: ");
}
int n = 1; // a global variable to track number of display refreshes
void loop() {
lcd.setCursor (16,3); // go to col 16 of the last row
lcd.print(n++,DEC); // update the display with a new number
// - overwrites previous characters
// - be sure new number is more digits
delay(500); // wait half a second before another update
}
Re: LCD probléma
Javasolt a shopban levő kódot használni.
És a lábkiosztást is kiválasztani a modulnak megfelelően....
És a lábkiosztást is kiválasztani a modulnak megfelelően....
http://www.tavir.hu - a gazda
Re: LCD probléma
Köszönöm a segítséget, sikerült életre kelteni , végül is a könyvtár-kezelésem volt "béna". De minden feladattal egy lépéssel előre van az ember...