
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 )-- */