Go Down

Topic: Help with Timing issues (Read 307 times) previous topic - next topic

djjester611

These are my errors even though it still compiles and runs.. wanted to clean up with no errors.
Arduino 1.0.2

here is whole file  https://www.dropbox.com/s/qcnqsksx1qipcya/Tank_Completion_4%20v2ino.ino


sketch_jan26a.ino: In function 'void loop()':
sketch_jan26a.ino:41: warning: comparison between signed and unsigned integer expressions

C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':
C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\HardwareSerial.cpp:83: warning: comparison between signed and unsigned integer expressions
C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\HardwareSerial.cpp: In function 'void __vector_18()':
C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\HardwareSerial.cpp:117: warning: unused variable 'c'
C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\HardwareSerial.cpp: In member function 'void HardwareSerial::begin(long unsigned int, byte)':
C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\HardwareSerial.cpp:364: warning: unused variable 'current_config'
C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\HardwareSerial.cpp: In member function 'virtual size_t HardwareSerial::write(uint8_t)':
C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\HardwareSerial.cpp:463: warning: comparison between signed and unsigned integer expressions

C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\Print.cpp:44: warning: '__progmem__' attribute ignored

C:\Program Files (x86)\arduino-1.0.2\hardware\arduino\cores\arduino\Tone.cpp:119: warning: only initialized variables can be placed into program memory area


//TIME
  int time =  (hour * 60) + minute;
  int time1 = (hour * 60) + minute;
  int time2 = (hour * 60) + minute;
  int time3 = (hour * 60) + minute;
  //int time4 = (hour * 60) + minute; unused at the moment
//LED's  On
  if((time >= 0 && time <= 389)||(time >= 1049 && time <= 1440))
  {  digitalWrite(led, HIGH);  }
  else
  {  digitalWrite(led,LOW);    }
 
// Actinic AM on
  if((time1 >= 359 && time1 <= 540)||(time1 >= 899 && time1 <= 1140))
  {  digitalWrite(cfl, HIGH);
     digitalWrite(fan, HIGH);}
  else
  {  digitalWrite(cfl,LOW);
     digitalWrite(fan,LOW);  }

//Metal Halide Fan On
  if(time2 >= 494 && time2 <= 944)
  {  digitalWrite(fan, HIGH);
     digitalWrite(mh, HIGH);  }
  else
  {  digitalWrite(fan,LOW);
     digitalWrite(mh,LOW);  }
 
//Tank 2 PM On
  if((time3 >= 0 && time3 <= 359)||(time3 >= 1079 && time3 <= 1140))
  {  digitalWrite(tank2, HIGH);  }
  else
  {  digitalWrite(tank2,LOW);    }

PaulS

How are you compiling the code? The IDE turns off warnings, so you are clearly not using the IDE.

What is the point in having 4 variables containing the same value?

Go Up