Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when compiling
06-02-2013, 11:39 AM,
#1
Error when compiling
// Comment line above if you using a pinguino with PIC18F2550.
//#define PIC18F4550

#define LED 13
#define HOUR 14
#define MIN 15

//global vars
uchar counter = 0;
uchar sec = 0;
uchar min = 0;
uchar hour = 0;

float num;

void setup(){
//8 bits mode
//lcd(8, 9, 0, 1, 2, 3, 4, 5, 6, 7); // RS, E, D0 ~ D7

//4 bits mode, dont use last four pins ...
lcd(8, 9, 0, 1, 2, 3, 0, 0, 0, 0); // RS, E, D4 ~ D8

//LCD format
lcd.begin(2, 0);

/* Debug */
pinMode(LED, OUTPUT); // LED on pin 13

//Setup buttons
pinMode(HOUR, INPUT);
pinMode(MIN, INPUT);
}

void loop()
{
// Output string
lcd.home();
lcd.print("Pinguino-LCDlib"); // Output char

if (counter>9){
counter = 0;
sec++;
}

if (sec>59){
sec = 0;
min++;
}

if (min>59){
min = 0;
hour++;
}

if (hour>23){
hour = 0;
}


lcd.setCursor(0, 1);

if (hour < 10)
lcd.print("0");
lcd.printNumber(hour, 10);

if (min < 10)
lcd.print(":0");
else
lcd.print(":");
lcd.printNumber(min, 10);

if (sec < 10)
lcd.print(":0");
else
lcd.print(":");
lcd.printNumber(sec, 10);

//set hour and min
if(digitalRead(HOUR)){
hour++;
}
if(digitalRead(MIN)){
min++;
}

counter++;

delay(51); //just a fine tune to get 100ms with this!
digitalWrite(LED, LOW);
delay(51);
digitalWrite(LED, HIGH);
}




i had checked many time but still error show c:27: error 101: too many parameters when compling...i hope anyone can help me solve this problem ...thank you.
Reply
09-02-2013, 08:49 PM,
#2
RE: Error when compiling
try to replace : lcd(8, 9, 0, 1, 2, 3, 0, 0, 0, 0); // RS, E, D4 ~ D8
with : lcd.pins(8, 9, 0, 1, 2, 3, 0, 0, 0, 0); // RS, E, D4 ~ D8
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)