Hi,
also, den originalen Sketch habe ich modifiziert. Hier ein Auszug des Sketches einer Lampensteuerung für ein Riffaquarium mit blauen und weissen LEDS. Komplett hätte ich Ihn nicht posten können (zu viele Zeichen). Das SET habe ich jetzt hier schon wieder auskommentiert, werde es dann nachher uploaden. Ich Dummkopf habe nach meinem Uhr setzen (es hatte sich aus unerklärlichen Gründen wieder auf 0:00 gesetzt) vergessen das man es nur einmal uploaden muss.
Gruß,
Volker
/*
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| S E T U P |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
void setup() {
pinMode(ledPin1, OUTPUT); // set the digital pin as output:
pinMode(ledPin2, OUTPUT); // set the digital pin as output:
pinMode(fan, OUTPUT); // Set analog pin 0 as a output
pinMode(fuge, OUTPUT); // Set analog pin 1 as a output
pinMode(moon, OUTPUT); // Set ditital pin 2 as a output
sensors.begin(); // Start up the DS18B20 Temp library
Serial.begin(115200);
Serial.println("Hello.");
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| S E T U P - D I S P L A Y |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
Wire.begin();
// Change these values to what you want to set your clock to.
// You probably only want to set your clock once and then remove
// the setDateDs1307 call.
second = 00;
minute = 43 ;
hour = 20;
dayOfWeek = 3; // Sunday is 0
dayOfMonth = 15;
month = 2;
year = 12;
//Use the next line for setting the clock
//setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
analogWrite(blue, bluemin);
analogWrite(white, whitemin);
lcd.createChar(0, newChar);
lcd.createChar(1, newChar1);
lcd.createChar(2, newChar2);
lcd.createChar(3, newChar3);
lcd.createChar(4, newChar4);
lcd.createChar(5, newChar5);
lcd.createChar(6, newChar6);
lcd.createChar(7, newChar7);
lcd.begin(20, 4); // set up the LCD's number of rows and columns:
lcd.setCursor(0, 0);
lcd.write(0);
lcd.write(1);
lcd.setCursor(4, 0);// set the cursor to column 0, line 0
lcd.print("Volkers Riff");
lcd.setCursor(18, 0);
lcd.write(3);
lcd.write(2);
//lcd.setCursor(7, 1);
//lcd.print("M:");
lcd.setCursor(11, 1);
lcd.print("B:");
lcd.print(33*bluemin/85);
lcd.setCursor(16, 1);
lcd.print("W:");
lcd.print(33*whitemin/85);
lcd.setCursor(11, 2);
lcd.print("L: ");
lcd.setCursor(0, 2);
lcd.print("W: ");
lcd.setCursor(1, 3);
lcd.print("Mond: ");
lcd.setCursor(12, 3);
lcd.print("Fan: ");
}