Hallo zusammen!
Ich sitz grad meinem Projekt und hab das gleiche Problem wie ArduinoJo13, meine 2. Zeile tut nicht!
Allerdings nicht mit irgendwie RC2.
Ich hab grad nochmal das 1.0 drauf gemacht, aber das gleiche wie mit 0022 davor.
Wenn ich meinen abgewandelten "HelloWorld" draufspiel zeigts mir 2 Zeilen an.
Den Sketch der jetz nicht funktioniert soll Öltemperatur und Öldruck ausgeben. Die erste Zeile wenn allein im Sketch steht funktioniert.
Wenn ich jetz erweitern will auf die Anzeige "OIL-DRUCK:" in der 2. Zeile zeigt er mir nichts an, oder er vertauscht die beiden und schreibt "OIL-DRUCK: 25.4°C" in die erste Zeile, die 2. nix.
Display hab ich 2 gleiche nur andere Schriftfarbe, verhalten sich gleich.
Generell Hardware hab ich:
-Olimexino 328
-EA-Display W162-X3LW OLED-Display vom reichelt.de
http://www.reichelt.de/LCD-Module-organisch/EA-W162-X3LW/index.html?;ACTION=3;LA=2;ARTICLE=113317;GROUPID=3012;artnr=EA+W162-X3LW;SID=13TtIvvH8AAAIAAGne5Vc00730847faa794a25ac96ba7dc16d4b7Den Sketch hab ich im Netz gefunden und grob die für mich unwichtigen Sachen rausgeschnitten. Im Moment schaut der so aus:
/*
* Inputs ADC Value from Thermistor and outputs Temperature in Celsius
* requires: include <math.h>
* Utilizes the Steinhart-Hart Thermistor Equation:
* Temperature in Kelvin = 1 / {A + B[ln(R)] + C[ln(R)]3}
* where A = 0.001129148, B = 0.000234125 and C = 8.76741E-08
*
* These coefficients seem to work fairly universally, which is a bit of a
* surprise.
*
* Schematic:
* [Ground] -- [10k-pad-resistor] -- | -- [thermistor] --[Vcc (5 or 3.3v)]
* |
* Analog Pin 0
*
* In case it isn't obvious (as it wasn't to me until I thought about it), the analog ports
* measure the voltage between 0v -> Vcc which for an Arduino is a nominal 5v, but for (say)
* a JeeNode, is a nominal 3.3v.
*
* The resistance calculation uses the ratio of the two resistors, so the voltage
* specified above is really only required for the debugging that is commented out below
*
* Resistance = (1024 * PadResistance/ADC) - PadResistor
*
* I have used this successfully with some CH Pipe Sensors (
http://www.atcsemitec.co.uk/pdfdocs/ch.pdf)
* which be obtained from
http://www.rapidonline.co.uk.
*
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,10,7,6,5,4);
#include <math.h>
#define ThermistorPIN 0 // Analog Pin 0
float vcc = 4.97; // only used for display purposes, if used
// set to the measured Vcc.
float pad = 9850; // balance/pad resistor value, set this to
// the measured resistance of your pad resistor
float thermr = 10000; // thermistor nominal resistance
float Thermistor(int RawADC) {
long Resistance;
float Temp; // Dual-Purpose variable to save space.
Resistance=((1024 * pad / RawADC) - pad);
Temp = log(Resistance); // Saving the Log(resistance) so not to calculate it 4 times later
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
Temp = Temp - 273.15; // Convert Kelvin to Celsius
// BEGIN- Remove these lines for the function not to display anything
//Serial.print("ADC: ");
//Serial.print(RawADC);
//Serial.print("/1024"); // Print out RAW ADC Number
//Serial.print(", vcc: ");
//Serial.print(vcc,2);
//Serial.print(", pad: ");
//Serial.print(pad/1000,3);
//Serial.print(" Kohms, Volts: ");
//Serial.print(((RawADC*vcc)/1024.0),3);
//Serial.print(", Resistance: ");
//Serial.print(Resistance);
//Serial.print(" ohms, ");
// END- Remove these lines for the function not to display anything
// Uncomment this line for the function to return Fahrenheit instead.
//temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert to Fahrenheit
return Temp; // Return the Temperature
}
void setup() {
Serial.begin(9600);
lcd.setCursor(0,0);
lcd.print("OIL-TEMP:");
lcd.setCursor(0,1);
lcd.println("OIL-DRUCK:");
}
void loop() {
float temp;
temp=Thermistor(analogRead(ThermistorPIN)); // read ADC and convert it to Celsius
Serial.print("Celsius: ");
Serial.print(temp,1); // display Celsius
//temp = (temp * 9.0)/ 5.0 + 32.0; // converts to Fahrenheit
//Serial.print(", Fahrenheit: ");
//Serial.print(temp,1); // display Fahrenheit
Serial.println("");
if (temp <= 24)
{
lcd.setCursor(9,0);
lcd.print(" L O W ");
delay(500);
lcd.setCursor(9,0);
lcd.print(" ! ! ! ");
}
else
{
lcd.setCursor(10,0);
lcd.print(temp,1);
lcd.setCursor(14,0);
lcd.print((char)223);
lcd.print("C");
}
delay(1000); // Delay a bit...
}
Der Originale is hier:
http://www.qsl.net/on7eq/projects/arduino_davis.htmHab dort nur direkt vor dem voidloop (5-6 Zeilen davor) bei "lcd.write(0)" ne 1 reingemacht, sonst gab´s beim Compilen nen Fehler. Dann werden auch 2 Zeilen gezeigt.
Hoffe mir kann jemand weiterhelfen, geht um ein Projekt wofür ich nimmer lang Zeit hab bis Abgabetermin...

So long und freundliche Grüße
Mathias