Show Posts
Pages: 1 ... 34 35 [36] 37 38
526  Using Arduino / Displays / Re: LCD does not work unless Arduino is reset. on: September 06, 2011, 11:51:18 am
1- Indeed, that is the behaviour that I'm currently dealing with.

2- Pin 5 (r/w) is tied to gnd, as per this tutorial that I followed?.. http://www.ladyada.net/learn/lcd/charlcd.html

I tried a 100k to gnd on the E pin but still the same, also just tried two begin calls with a 1 sec delay in between, also no good smiley-sad
527  Using Arduino / Displays / Re: LCD does not work unless Arduino is reset. on: September 06, 2011, 11:03:47 am
does not work mate.

I'm just going to try the hardware solution now (pull down)

Thanks for the help
528  Using Arduino / Displays / Re: LCD does not work unless Arduino is reset. on: September 06, 2011, 07:50:49 am
Thanks, I should have checked my code properly!

Just complied, and downloaded to my arduino but I'm sad to say the problem is still the same smiley-sad
529  Using Arduino / Displays / Re: LCD does not work unless Arduino is reset. on: September 05, 2011, 12:35:03 pm
thanks I overlooked the symbols  smiley-fat

I'm getting another compile error now on this line  pLcd->.begin(16, 2);

do i still need that in there?
530  Using Arduino / Displays / Re: LCD does not work unless Arduino is reset. on: September 05, 2011, 06:49:24 am
Hi there, here is what I have currently

Code:
#include <LiquidCrystal.h>
void* operator new(unsigned int sz)
{
  return malloc(sz);
}

LiquidCrystal *pLcd;


//LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

int analoginput = 0;
int analoginput1 = 1;
int analoginput2 = 2;
float vin = 0.0;
float vin1 = 0.0;
float vin2 = 0.0;

void setup(){
  delay(1000);    // delay as per retrolefty's suggestion
  pLcd = new LiquidCrystal(7, 8, 9, 10, 11, 12);   // insert correct pin numbers here
 
 
delay(100);
 pLcd.begin(16, 2);
delay(100);


    pLcd.setCursor(0, 0);
   pLcd.print("REAPsystems V1.1");
       lcd.setCursor(0, 1);
   pLcd.print("iSensor tester");
   
   
delay(4000);
   
   
   
  pLcd.clear();

}



void loop(){
 
 
     delay(1400);


 // read the value on analog input
pLcd.setCursor(0,0);
pLcd.print ("Vin:");
vin = analogRead(analoginput)*5.00/1024*2;
pLcd.print(vin, 3);
pLcd.print ("v");
 
pLcd.setCursor(0,1);
pLcd.print ("R:");
vin1 = analogRead(analoginput1)*5.00/1024;
pLcd.print(vin1, 2);
pLcd.print ("v");


pLcd.setCursor(9,1);
pLcd.print ("O:");
vin2 = analogRead(analoginput2)*5.00/1024;
pLcd.print(vin2, 2);
pLcd.print ("v");


delay(1400);

}
531  Using Arduino / Displays / Re: LCD does not work unless Arduino is reset. on: September 05, 2011, 06:37:14 am
hey there. I do have a call to begin in the set-up.

I have tried al sorts of delay times before the begin but does not seem to help

I not sure how I recompile the library?

I just tried the last suggestion, replacing some of the bits but could not get that too complie smiley-sad

532  Using Arduino / Displays / Re: LCD does not work unless Arduino is reset. on: September 02, 2011, 06:41:28 pm
well two of my screens are now on their way to mr Raines for testing.

I have also purchased 2 other screens and they act exactly the same smiley-sad

they are..

http://www.ebay.co.uk/itm/160633652459?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649#ht_3834wt_957
http://www.ebay.co.uk/itm/190345879489?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649#ht_3812wt_906
533  Using Arduino / Project Guidance / Re: Very Small Arduino on: August 26, 2011, 06:31:20 am
Hey, looks like I have missed the boat but I'm certainly keen on buying a couple from you if you manage to get more stock  smiley-mr-green
534  Using Arduino / Project Guidance / Re: Temp measurement and display on: August 15, 2011, 05:00:42 pm
anyone know?

thanks
535  Using Arduino / Displays / Re: LCD does not work unless Arduino is reset. on: August 15, 2011, 04:55:49 am
Where can I buy one just like it? model number etc.



I know that's not aimed for me, and I'm sorry to hijack but Id be happy to send you one of the screens that I'm having the same problem with if you cover say half the postage with me?

536  Using Arduino / Project Guidance / Re: Temp measurement and display on: August 14, 2011, 06:29:44 pm
Thanks  smiley-cool I thought you had to tell the characters exactly where to be placed. so that's much better now.

I edited the post while you where replying DOH  smiley-red

out if interest, what was I doing wrong with the if/else statements?
537  Using Arduino / Project Guidance / Re: Temp measurement and display on: August 14, 2011, 06:03:02 pm
hey, thanks that works great. I'm still really new to the arduino but learning little bits here and there especially thanks to people like yourself smiley

would it be complicated to have the degrees c symbol move to the left by one space when the temperature reading is in single figures?

Edit...

tried putting in if/else statements. It does compile and run but when the temp is <10 i get two degrees symbols for example 2°°C?

is it ignoring the if/else and just running both?

Code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);




#include <math.h>

double Thermister(int RawADC) {
 double Temp;
 Temp = log(((10240000/RawADC) - 10000));
 Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
 Temp = Temp - 273.15;            // Convert Kelvin to Celcius

 return Temp;
}

void setup() {
lcd.begin(16, 2);
delay(100);
 Serial.begin(115200);
   pinMode(13, OUTPUT);     
}





void loop() {
    lcd.clear();
 
      lcd.setCursor(0,0);
lcd.print(int(Thermister(analogRead(0))));


if (int(Thermister(analogRead(0)))  <= 10)
{
  lcd.setCursor(1,0);
  lcd.print((char)223);
 
 
    lcd.setCursor(2,0);
    lcd.print ("c");  // action A
}
else if (int(Thermister(analogRead(0)))  >= 10)
{
  lcd.setCursor(2,0);
  lcd.print((char)223);
 
 
    lcd.setCursor(3,0);
    lcd.print ("c");  // action B
}


 
  lcd.setCursor(2,0);
  lcd.print((char)223);
 
 
    lcd.setCursor(3,0);
    lcd.print ("c");



 Serial.println(int(Thermister(analogRead(0))));  // display Fahrenheit
 
 
   digitalWrite(13, HIGH);   // set the LED on
  delay(2);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(10000);              // wait for a second
 
}

538  Using Arduino / Project Guidance / Re: Temp measurement and display on: August 14, 2011, 05:32:20 pm
right, if i reset the board when the temp is below 10 degrees the lcd displays fine, so I guess when it goes below 10 I need to clear the display or something?
539  Using Arduino / Project Guidance / Temp measurement and display on: August 14, 2011, 05:16:43 pm
hi all, just messing around and getting used to the arduino.

I've hooked up a 10k thermistor and got it working using a tutorial to feedback data over serial. I have added too the code to display on my lcd screen. It works but when the temp goes below 10 degrees the display moves the digit over so for example 9 degrees reads 90. It does not display like this on the serial monitor however, but I used the same code to get the data over the display?
Hope that makes sense!

Code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);




#include <math.h>

double Thermister(int RawADC) {
 double Temp;
 Temp = log(((10240000/RawADC) - 10000));
 Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
 Temp = Temp - 273.15;            // Convert Kelvin to Celcius

 return Temp;
}

void setup() {
lcd.begin(16, 2);
delay(100);
 Serial.begin(115200);
}





void loop() {
 
      lcd.setCursor(0,0);
lcd.print(int(Thermister(analogRead(0))));
 
  lcd.setCursor(2,0);
  lcd.print((char)223);
 
 
    lcd.setCursor(3,0);
    lcd.print ("c");



 Serial.println(int(Thermister(analogRead(0))));  // display Fahrenheit
 delay(1000);
}

540  Topics / Home Automation and Networked Objects / Re: Time/temperature controller on: August 13, 2011, 09:43:16 pm
looks great! any videos? smiley
Pages: 1 ... 34 35 [36] 37 38