Problem z biblioteką DS1302 - LCD-Blue-I2C

Witam czy może ktoś ma bibliotekę do DS1302 - LCD-Blue-I2C. Ściągnąłem kilka bibliotek ale żadnej nie mogę wgrać ! Proszę o pomoc bo jestem początkujący! Pozdrawiam

Hi Dany,

This part of the forum is English-speaking. Please provide the English translation (for example, by Google Translate)

Please provide as much information as possible, like which libraries you downloaded exactly (URL) so people do not propose the same to you.

Hi Dany,

Ta część forum jest Anglojęzycznych. Proszę dostarczyć tłumaczenie na język angielski (na przykład przez Google Translate)

Proszę podać jak najwięcej informacji, które, podobnie jak dokładnie bibliotek (URL) pobranych więc ludzie nie proponują to samo do ciebie.

Rob

Hello Maybe someone has to do IS library DS1302 - LCD-blue-I2C. I downloaded a few libraries but none I can not upload! Please help me because I'm a beginner! Regards

I can't tell what you are looking for. DS1302 is an i2c RTC clock not an i2c LCD.
What do you have and what are you having issues with?

-- bill

I LiquidCrystal_I2C display and clock DS1302RTC! I wish the date and time show on the display. I pulled a few bibiotek and still gives me an error!

Which LiquidCrystal_I2C library? There are many different libraries all with the same name.
What kind of errors? Are the errors for the RTC library or the LCD library?

For an easy to install and easy to use I2C lcd library, I recommend my hd44780 library.
It can be installed from the IDE using the library manager.
You can read more about it here:

The i/o class you will use is hd44780_I2Cexp
It will automatically figure out the i2c address and pin mappings.
There are several examples.
Run the included diagnostic sketch (I2CexpDiag) to test your i2c pins and LCD memory.

Using hd44780 for the LCD library will ensure that you have a working i2c LCD and can focus on getting the RTC library and code working.

--- bill

Hi, can someone write me what is wrong in this library

// DS1302: RST pin -> Arduino Digital 2
// DATA pin -> Arduino Digital 3
// CLK pin -> Arduino Digital 4

#include <DS1302.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C LCD (0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Pins of LCD
/ *
0 pin setting day of the week -
Pin 1 setting day of the week +

5 pin to set the date / time +
pin 6 date / time -
Pin 7 to set month / min +
8 pin to set month / min -
pin 9 setting year / sec +
pin 10 set the year / sec -

pin 12 hold (set hours / minutes / seconds
pin 13 hold (set the day / month / year

  • /

DS1302 rtc (2, 3, 4);
int day = 1;
int month = 1;
int year = 2016;
int daysOfTheWeek;

int hour;
int minute;
int seconds;
void setup ()
{
// Set the clock to run-mode, and disable the write protection
rtc.halt (false);
rtc.writeProtect (false);

// Setup LCD is a 16x2 characters
lcd.begin (16, 2);

pinMode (12, INPUT);
digitalWrite (12, HIGH);

pinMode (13, INPUT);
digitalWrite (13, HIGH);

pinMode (5, INPUT);
digitalWrite (5, HIGH);

pinMode (6, INPUT);
digitalWrite (6, HIGH);

pinMode (7, INPUT);
digitalWrite (7, HIGH);

pinMode (8, INPUT);
digitalWrite (8, HIGH);

pinMode (9, INPUT);
digitalWrite (9, HIGH);

pinMode (10, INPUT);
digitalWrite (10, HIGH);

pinMode (0, INPUT);
digitalWrite (0, HIGH);
pinMode (1, INPUT);
digitalWrite (1, HIGH);

// The Following lines can be commented out to use the values already stored in the DS1302
//rtc.setDOW(WEDNESDAY); // Set Day-of-Week is FRIDAY
//rtc.setTime(22, 38, 0); // Set the time to 12:00:00 (24hr format)
//rtc.setDate(5, 10); // Set the date to August 6th, 2010
}

void loop ()
{
if (digitalRead (1) == LOW)
{
daysOfTheWeek daysOfTheWeek = + 1;
rtc.setDOW ((daysOfTheWeek));
}
if (digitalRead (0) == LOW)
{
daysOfTheWeek daysOfTheWeek = 1;
rtc.setDOW ((daysOfTheWeek));
}

if (digitalRead (12) == LOW)
{

lcd.setCursor (0.1);
lcd.print ( "TIME");
lcd.setCursor (6.0);
if (digitalRead (5) == LOW)
{
h = h + 1;
rtc.setTime ((hours) (min) (sec));
}
if (digitalRead (6) == LOW)
{
time = 1 hour;
rtc.setTime ((hours) (min) (sec));
}
if (digitalRead (7) == LOW)
{
min = minutes + 1;
rtc.setTime ((hours) (min) (sec));
}
if (digitalRead (8) == LOW)
{
min = min-1;
rtc.setTime ((hours) (min) (sec));
}
if (digitalRead (9) == LOW)
{
seconds = seconds + 1;
rtc.setTime ((hours) (min) (sec));
}
if (digitalRead (10) == LOW)
{
sec = sec-1;
rtc.setTime ((hours) (min) (sec));
}

}

if (digitalRead (13) == LOW)
{

lcd.setCursor (0.1);
lcd.print ( "DATA");
lcd.setCursor (6.0);
if (digitalRead (5) == LOW)
{
day = day + 1;
rtc.setDate ((day), (month), (year));
}
if (digitalRead (6) == LOW)
{
day = 1 day;
rtc.setDate ((day), (month), (year));
}
if (digitalRead (7) == LOW)
{
month = month + 1;
rtc.setDate ((day), (month), (year));
}
if (digitalRead (8) == LOW)
{
month = 1 month;
rtc.setDate ((day), (month), (year));
}
if (digitalRead (9) == LOW)
{
Year = year + 1;
rtc.setDate ((day), (month), (year));
}
if (digitalRead (10) == LOW)
{
Year = year-1;
rtc.setDate ((day), (month), (year));
}

}

// Display time centered on the upper line
lcd.setCursor (8, 0);
lcd.print (rtc.getTimeStr ());

// Display abbreviated Day-of-Week in the upper left corner
lcd.setCursor (0, 0);
lcd.print (rtc.getDOWStr ());

// Display the date in the upper right corner
lcd.setCursor (6: 1);
lcd.print (rtc.getDateStr ());

// Wait one second before repeating :slight_smile:
delay (100);
}

clockbutton.ino (3.88 KB)

We still don't know what issues you are having or which libraries you are using.
See post #5.
--- bill

toznaczy which library

I'm beginning to think that the language gap is a bit too far to bridge.

You can even tell me if this code which I sent in the Annex is correct and why I can not upload

Can you upload the blink example?
[File]->[Examples]->[0.1 Basics]-> Blink

This is what I sent good

Hello I have with flashing this library

#include <DS1302RTC.h>
#include <Time.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define BACKLIGHT_PIN 3
LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3,POSITIVE);

const char *monthName[12] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};

void setup() {

lcd.begin(16, 2);
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
}

void loop() {

tmElements_t tm;

if (RTC.read(tm)) {

lcd.setCursor (0, 0);
LCDprint2digits(tm.Hour);
lcd.print(':');
LCDprint2digits(tm.Minute);
lcd.print(':');
LCDprint2digits(tm.Second);
lcd.setCursor (0, 1);
lcd.print(tm.Day);
lcd.print('/');
lcd.print(monthName[tm.Month-1]);
lcd.print('/');
lcd.print(tmYearToCalendar(tm.Year));

} else {
if (RTC.chipPresent()) {
lcd.println("DS1302 stoi. Uruchom Zegar");
}
else {
lcd.println("DS1302 blad oczczytu!");
lcd.println("sprawdz polaczenie");
}
delay(9000);
}
delay(1000);
}

//void print2digits(int number) {
// if (number >= 0 && number < 10) {
// Serial.write('0');
// }
// Serial.print(number);
//}

void LCDprint2digits(int number) {
if (number >= 0 && number < 10) {
lcd.write('0');
}
lcd.print(number);
}

library LiquidCrystal_V1.2.1.zip