Liczba postów: 28
Liczba wątków: 1
Dołączył: Jan 2017
Reputacja:
0
Witam jakie oprogramowanie najlepiej ściągnąć? Aktualnie mam 1.8.1 może to jest przyczyną że nie kompiluje się !!!
Liczba postów: 28
Liczba wątków: 1
Dołączył: Jan 2017
Reputacja:
0
np:co z tym kodem jest nie tak
#include <Time.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DS1302RTC.h>
DS1302RTC RTC(27, 29, 31);
#define DS1302_GND_PIN 33
#define DS1302_VCC_PIN 35
#include <Time.h>
LiquidCrystal_I2C lcd();
void setup() {
lcd.begin(20, 4);
digitalWrite(DS1302_GND_PIN, LOW);
pinMode(DS1302_GND_PIN, OUTPUT);
digitalWrite(DS1302_VCC_PIN, HIGH);
pinMode(DS1302_VCC_PIN, OUTPUT);
lcd.print("RTC activated");
delay(500);
lcd.clear();
if (RTC.haltRTC())
lcd.print("Clock stopped!");
else
lcd.print("Clock working.");
lcd.setCursor(0,1);
if (RTC.writeEN())
lcd.print("Write allowed.");
else
lcd.print("Write protected.");
delay ( 2000 );
lcd.clear();
lcd.print("RTC Sync");
setSyncProvider(RTC.get);
if(timeStatus() == timeSet)
lcd.print(" Ok!");
else
lcd.print(" FAIL!");
delay ( 2000 );
lcd.clear();
}
void loop()
{
static int sday = 0;
lcd.setCursor(3, 0);
print2digits(hour());
lcd.print(" ");
print2digits(minute());
lcd.print(" ");
print2digits(second());
// Update in 00:00:00 hour only
if(sday != day()) {
lcd.setCursor(0, 1);
lcd.print(dayShortStr(weekday()));
lcd.setCursor(5, 1);
lcd.print(" ");
print2digits(day());
lcd.print("/");
print2digits(month());
lcd.print("/");
lcd.print(year());
}
if(timeStatus() != timeSet) {
lcd.setCursor(0, 1);
lcd.print(F("RTC ERROR: SYNC!"));
}
sday = day();
delay (100);
}
void print2digits(int number) {
if (number >= 0 && number < 10) {
lcd.write('_');
}
lcd.print(number);
}
Liczba postów: 28
Liczba wątków: 1
Dołączył: Jan 2017
Reputacja:
0
błędy
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
DS1302_LCD:8: error: 'DS1302RTC' does not name a type
DS1302_LCD.ino: In function 'void setup()':
DS1302_LCD:21: error: request for member 'begin' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:30: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:34: error: request for member 'clear' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:35: error: 'RTC' was not declared in this scope
DS1302_LCD:36: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:38: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:40: error: request for member 'setCursor' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:41: error: 'RTC' was not declared in this scope
DS1302_LCD:42: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:44: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:49: error: request for member 'clear' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:50: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:51: error: 'RTC' was not declared in this scope
DS1302_LCD:51: error: 'setSyncProvider' was not declared in this scope
DS1302_LCD:52: error: 'timeStatus' was not declared in this scope
DS1302_LCD:52: error: 'timeSet' was not declared in this scope
DS1302_LCD:53: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:55: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:59: error: request for member 'clear' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD.ino: In function 'void loop()':
DS1302_LCD:67: error: request for member 'setCursor' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:68: error: 'hour' was not declared in this scope
DS1302_LCD:69: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:70: error: 'minute' was not declared in this scope
DS1302_LCD:71: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:72: error: 'second' was not declared in this scope
DS1302_LCD:75: error: 'day' was not declared in this scope
DS1302_LCD:77: error: request for member 'setCursor' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:78: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:78: error: 'weekday' was not declared in this scope
DS1302_LCD:78: error: 'dayShortStr' was not declared in this scope
DS1302_LCD:81: error: request for member 'setCursor' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:82: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:84: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:85: error: 'month' was not declared in this scope
DS1302_LCD:86: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:87: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:87: error: 'year' was not declared in this scope
DS1302_LCD:90: error: 'timeStatus' was not declared in this scope
DS1302_LCD:90: error: 'timeSet' was not declared in this scope
DS1302_LCD:91: error: request for member 'setCursor' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:92: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:96: error: 'day' was not declared in this scope
DS1302_LCD.ino: In function 'void print2digits(int)':
DS1302_LCD:104: error: request for member 'write' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
DS1302_LCD:106: error: request for member 'print' in 'lcd', which is of non-class type 'LiquidCrystal_I2C ()()'
Liczba postów: 397
Liczba wątków: 0
Dołączył: Oct 2016
Reputacja:
73
Dlaczego teraz kompilujesz plik HelloWorld_i2c?
Pomagam za darmo więc szanuj mój czas.
Wklejaj tekst a nie jego zdjęcie.
Nie pisz następnego postu jak nie odpowiedziałeś na poprzedni.
Jak mądrze zadawać pytania
Liczba postów: 28
Liczba wątków: 1
Dołączył: Jan 2017
Reputacja:
0
Nadal błąd
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
DS1302_LCD:8: error: 'DS1302RTC' does not name a type
DS1302_LCD:16: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int)'
C:\Users\DANIEL\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:57: note: candidates are: LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, uint8_t)
C:\Users\DANIEL\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:55: note: LiquidCrystal_I2C::LiquidCrystal_I2C(const LiquidCrystal_I2C&)
DS1302_LCD.ino: In function 'void setup()':
DS1302_LCD:35: error: 'RTC' was not declared in this scope
DS1302_LCD:41: error: 'RTC' was not declared in this scope
DS1302_LCD:51: error: 'RTC' was not declared in this scope
DS1302_LCD:51: error: 'setSyncProvider' was not declared in this scope
DS1302_LCD:52: error: 'timeStatus' was not declared in this scope
DS1302_LCD:52: error: 'timeSet' was not declared in this scope
DS1302_LCD.ino: In function 'void loop()':
DS1302_LCD:68: error: 'hour' was not declared in this scope
DS1302_LCD:70: error: 'minute' was not declared in this scope
DS1302_LCD:72: error: 'second' was not declared in this scope
DS1302_LCD:75: error: 'day' was not declared in this scope
DS1302_LCD:78: error: 'weekday' was not declared in this scope
DS1302_LCD:78: error: 'dayShortStr' was not declared in this scope
DS1302_LCD:85: error: 'month' was not declared in this scope
DS1302_LCD:87: error: 'year' was not declared in this scope
DS1302_LCD:90: error: 'timeStatus' was not declared in this scope
DS1302_LCD:90: error: 'timeSet' was not declared in this scope
DS1302_LCD:96: error: 'day' was not declared in this scope
Liczba postów: 28
Liczba wątków: 1
Dołączył: Jan 2017
Reputacja:
0
sorki pomyliłem się ale tamten też nie wchodzi
Liczba postów: 397
Liczba wątków: 0
Dołączył: Oct 2016
Reputacja:
73
Którą wersję biblioteki LiquidCrystal ściągnąłeś? Podaj nazwę pliku zip.
Czy w katalogu C:\Users\DANIEL\Documents\Arduino\libraries\ masz jeszcze inne biblioteki LiquidCrysta? Jeśli tak to przenieś je w inne miejsce.
Dlaczego używasz starej wersji Arduino-IDE?
Pomagam za darmo więc szanuj mój czas.
Wklejaj tekst a nie jego zdjęcie.
Nie pisz następnego postu jak nie odpowiedziałeś na poprzedni.
Jak mądrze zadawać pytania