Arduino 1.06 problem

C, C++, Pascal, Assembly, Raspberry, Java, Matlab, Python, BASIC, SQL, PHP, etc.
Chaf
Inlägg: 718
Blev medlem: 9 februari 2008, 11:05:31
Ort: Stockholm

Arduino 1.06 problem

Inlägg av Chaf »

Hej :D
Uppgraderade till 1,06 nu fungerar inte koden.Får felmeddelande.
M.v.h
Chaf
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"
_12C_R_tt:11: error: 'POSITIVE' was not declared in this scope
_12C_R_tt.ino: In function 'void setup()':
_12C_R_tt:26: error: 'class LiquidCrystal_I2C' has no member named 'backlight'
_12C_R_tt:28: error: 'class LiquidCrystal_I2C' has no member named 'noBacklight'
_12C_R_tt:31: error: 'class LiquidCrystal_I2C' has no member named 'backlight'

Kod: Markera allt

    /*-----( Import needed libraries )-----*/
    #include <Wire.h> // Comes with Arduino IDE
     
    #include <LiquidCrystal_I2C.h>
     
    /*-----( Declare Constants )-----*/
    /*-----( Declare objects )-----*/
    // set the LCD address to 0x27 for a 20 chars 4 line display
    // Set the pins on the I2C chip used for LCD connections:
    // addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
    LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
     
     
    /*-----( Declare Variables )-----*/
     
     
    void setup() /*----( LOOP: RUNS CONSTANTLY )----*/
    {
    Serial.begin(9600); // Used to type in characters
     
    lcd.begin(20,4); // initialize the lcd for 20 chars 4 lines, turn on backlight
     
    // ------- Quick 3 blinks of backlight -------------
    for(int i = 0; i< 3; i++)
    {
    lcd.backlight();
    delay(250);
    lcd.noBacklight();
    delay(250);
    }
    lcd.backlight(); // finish with backlight on
     
     
    }/*--(end setup )---*/
     
     
    void loop(){/*----( LOOP: RUNS CONSTANTLY )----*/
    lcd.clear();
    lcd.setCursor(2,0);    
    lcd.print("Christer Farman");   
    delay(1000);
    lcd.setCursor(3,1);
    lcd.print("Bohusgatan 19");
    delay(1000);
    lcd.setCursor(2,2);
    lcd.print("116 67 Stockholm");
    lcd.setCursor(1,3);
    delay(1000);
    lcd.print("Email chaf@live.se");
    delay(3000);
    lcd.clear();
    lcd.setCursor(2,0); //Start at character 0 on line 0
    lcd.print("Telnr 0707768816");
    delay(1500);
    lcd.setCursor(0,1);
    lcd.print("Stockholm Makerspace");
    delay(1500);
    lcd.setCursor(1,2);
    lcd.print(" Elektronikforumet");
    delay(1500);
    lcd.setCursor(1,3);
    lcd.print(" Fungerar bra kul! ");
    delay(2000);
     
   
     
    }/* --(end main loop )-- */
Zkronk
Inlägg: 1439
Blev medlem: 23 augusti 2005, 16:44:36
Ort: Uppsala

Re: Arduino 1.06 problem

Inlägg av Zkronk »

Byt ut Wire.h i andra raden till Arduino.h så funkar det förhoppningsvis.
Chaf
Inlägg: 718
Blev medlem: 9 februari 2008, 11:05:31
Ort: Stockholm

Re: Arduino 1.06 problem

Inlägg av Chaf »

Hjälpte inte. Använder windows 7 fungerar med XP i laptopen med 1.05
//Chaf
sodjan
EF Sponsor
Inlägg: 43245
Blev medlem: 10 maj 2005, 16:29:20
Ort: Söderköping

Re: Arduino 1.06 problem

Inlägg av sodjan »

En med samma fel som löste det:
http://forum.arduino.cc/index.php?topic=214356.0

(Googlade på ett av dina felmeddelanden...)
Chaf
Inlägg: 718
Blev medlem: 9 februari 2008, 11:05:31
Ort: Stockholm

Re: Arduino 1.06 problem

Inlägg av Chaf »

Tack för hjälpen nu fungerar det.
//Chaf
sodjan
EF Sponsor
Inlägg: 43245
Blev medlem: 10 maj 2005, 16:29:20
Ort: Söderköping

Re: Arduino 1.06 problem

Inlägg av sodjan »

Vad var problemet?
Chaf
Inlägg: 718
Blev medlem: 9 februari 2008, 11:05:31
Ort: Stockholm

Re: Arduino 1.06 problem

Inlägg av Chaf »

Hej
Lagt till ett till LiquidCrystal V1.2.1 som jag bytt namn på.
Gick inte med samma namn.
//Chaf
Skriv svar