Skip to main content
Tweeted twitter.com/StackArduino/status/933917951618674688

I have a list of set-ups and I only have 2 rows in the lcd , I'm trying to scroll down for the moment and ImI'm doing this by changing the row in the setcurseorsetcursor function toto either 0 or 1  .

However since that IllI'll be having about 10 set-ups I used an equation that will change the rows to 0 and one for the ones I want to display and a negative number for those that I dontdon't want to appear  . The problem is when setting the cursor's row to -1 or 22, it will ignore the one with row one (which is the 2nd row  ).

isIs there a way that I can overcome this problem ? by setting it to a row that will not appear on my lcd LCD? imI'm using the #include <LiquidCrystal.h>#include <LiquidCrystal.h> and I already set lcd.begin(16, 2);lcd.begin(16, 2);

      int  colom[5] = {
    0-goDown,1-goDown,2-goDown,3-goDown,4-goDown  };
for (int i = 0; i < 4; i++) {
    if (colom[i] > 1) colom[i] = -1;
}

  lcd.setCursor(0, colom[0]);
  lcd.print("choise 1 ");
  lcd.setCursor(0, colom[1]);
  lcd.print("choise 2 ");
  lcd.setCursor(0, colom[2]);
  lcd.print("choise 3 ");
  lcd.setCursor(0, colom[3]);
  lcd.print("choise 4 ");
  lcd.setCursor(0, colom[4]);
  lcd.print("choise 5 ");

soSo here goDown is 0 so choice 1 and 2 should appear  , but ImI'm only getting choice 1 and in the second row itsit's changing quickly between 2 and 5  , itsit's not constant.

I thought about doing an if condition for each choice but that will be a lot of code to write and it wontwon't be efficient for my application.

I have a list of set-ups and I only have 2 rows in the lcd , I'm trying to scroll down for the moment and Im doing this by changing the row in the setcurseor function to either 0 or 1  .

However since that Ill be having about 10 set-ups I used an equation that will change the rows to 0 and one for the ones I want to display and a negative number for those that I dont want to appear  . The problem is when setting the cursor's row to -1 or 2 it will ignore the one with row one (which is the 2nd row  )

is there a way that I can overcome this problem ? by setting it to a row that will not appear on my lcd ? im using the #include <LiquidCrystal.h> and I already set lcd.begin(16, 2);

      int  colom[5] = {
    0-goDown,1-goDown,2-goDown,3-goDown,4-goDown  };
for (int i = 0; i < 4; i++) {
    if (colom[i] > 1) colom[i] = -1;
}

  lcd.setCursor(0, colom[0]);
  lcd.print("choise 1 ");
  lcd.setCursor(0, colom[1]);
  lcd.print("choise 2 ");
  lcd.setCursor(0, colom[2]);
  lcd.print("choise 3 ");
  lcd.setCursor(0, colom[3]);
  lcd.print("choise 4 ");
  lcd.setCursor(0, colom[4]);
  lcd.print("choise 5 ");

so here goDown is 0 so choice 1 and 2 should appear  , but Im only getting choice 1 and in the second row its changing quickly between 2 and 5  , its not constant

I thought about doing an if condition for each choice but that will be a lot of code to write and it wont be efficient for my application

I have a list of set-ups and I only have 2 rows in the lcd , I'm trying to scroll down for the moment and I'm doing this by changing the row in the setcursor function to either 0 or 1.

However since that I'll be having about 10 set-ups I used an equation that will change the rows to 0 and one for the ones I want to display and a negative number for those that I don't want to appear. The problem is when setting the cursor's row to -1 or 2, it will ignore the one with row one (which is the 2nd row).

Is there a way that I can overcome this problem ? by setting it to a row that will not appear on my LCD? I'm using #include <LiquidCrystal.h> and I already set lcd.begin(16, 2);

int  colom[5] = {
    0-goDown,1-goDown,2-goDown,3-goDown,4-goDown  };
for (int i = 0; i < 4; i++) {
    if (colom[i] > 1) colom[i] = -1;
}

  lcd.setCursor(0, colom[0]);
  lcd.print("choise 1 ");
  lcd.setCursor(0, colom[1]);
  lcd.print("choise 2 ");
  lcd.setCursor(0, colom[2]);
  lcd.print("choise 3 ");
  lcd.setCursor(0, colom[3]);
  lcd.print("choise 4 ");
  lcd.setCursor(0, colom[4]);
  lcd.print("choise 5 ");

So here goDown is 0 so choice 1 and 2 should appear, but I'm only getting choice 1 and in the second row it's changing quickly between 2 and 5, it's not constant.

I thought about doing an if condition for each choice but that will be a lot of code to write and it won't be efficient for my application.

added 77 characters in body
Source Link
user730
  • 51
  • 1
  • 3

I have a list of set-ups and I only have 2 rows in the lcd , I'm trying to scroll down for the moment and Im doing this by changing the row in the setcurseor function to either 0 or 1 .

However since that Ill be having about 10 set-ups I used an equation that will change the rows to 0 and one for the ones I want to display and a negative number for those that I dont want to appear . The problem is when setting the cursor's row to -1 or 2 it will ignore the one with row one (which is the 2nd row )

is there a way that I can overcome this problem ? by setting it to a row that will not appear on my lcd ? im using the #include <LiquidCrystal.h> and I already set lcd.begin(16, 2);

      int  colom[5] = {
    0-goDown,1-goDown,2-goDown,3-goDown,4-goDown  };
for (int i = 0; i < 4; i++) {
    if (colom[i] > 1) colom[i] = -1;
}

  lcd.setCursor(0, colom[0]);
  lcd.print("choise 1 ");
  lcd.setCursor(0, colom[1]);
  lcd.print("choise 2 ");
  lcd.setCursor(0, colom[2]);
  lcd.print("choise 3 ");
  lcd.setCursor(0, colom[3]);
  lcd.print("choise 4 ");
  lcd.setCursor(0, colom[4]);
  lcd.print("choise 5 ");

so here goDown is 0 so choice 1 and 2 should appear , but Im only getting choice 1 and in the second row its changing quickly between 2 and 5 , its not constant

I thought about doing an if condition for each choice but that will be a lot of code to write and it wont be efficient for my application

I have a list of set-ups and I only have 2 rows in the lcd , I'm trying to scroll down for the moment and Im doing this by changing the row in the setcurseor function to either 0 or 1 .

However since that Ill be having about 10 set-ups I used an equation that will change the rows to 0 and one for the ones I want to display and a negative number for those that I dont want to appear . The problem is when setting the cursor's row to -1 or 2 it will ignore the one with row one (which is the 2nd row )

is there a way that I can overcome this problem ? by setting it to a row that will not appear on my lcd ?

      int  colom[5] = {
    0-goDown,1-goDown,2-goDown,3-goDown,4-goDown  };
for (int i = 0; i < 4; i++) {
    if (colom[i] > 1) colom[i] = -1;
}

  lcd.setCursor(0, colom[0]);
  lcd.print("choise 1 ");
  lcd.setCursor(0, colom[1]);
  lcd.print("choise 2 ");
  lcd.setCursor(0, colom[2]);
  lcd.print("choise 3 ");
  lcd.setCursor(0, colom[3]);
  lcd.print("choise 4 ");
  lcd.setCursor(0, colom[4]);
  lcd.print("choise 5 ");

so here goDown is 0 so choice 1 and 2 should appear , but Im only getting choice 1 and in the second row its changing quickly between 2 and 5 , its not constant

I thought about doing an if condition for each choice but that will be a lot of code to write and it wont be efficient for my application

I have a list of set-ups and I only have 2 rows in the lcd , I'm trying to scroll down for the moment and Im doing this by changing the row in the setcurseor function to either 0 or 1 .

However since that Ill be having about 10 set-ups I used an equation that will change the rows to 0 and one for the ones I want to display and a negative number for those that I dont want to appear . The problem is when setting the cursor's row to -1 or 2 it will ignore the one with row one (which is the 2nd row )

is there a way that I can overcome this problem ? by setting it to a row that will not appear on my lcd ? im using the #include <LiquidCrystal.h> and I already set lcd.begin(16, 2);

      int  colom[5] = {
    0-goDown,1-goDown,2-goDown,3-goDown,4-goDown  };
for (int i = 0; i < 4; i++) {
    if (colom[i] > 1) colom[i] = -1;
}

  lcd.setCursor(0, colom[0]);
  lcd.print("choise 1 ");
  lcd.setCursor(0, colom[1]);
  lcd.print("choise 2 ");
  lcd.setCursor(0, colom[2]);
  lcd.print("choise 3 ");
  lcd.setCursor(0, colom[3]);
  lcd.print("choise 4 ");
  lcd.setCursor(0, colom[4]);
  lcd.print("choise 5 ");

so here goDown is 0 so choice 1 and 2 should appear , but Im only getting choice 1 and in the second row its changing quickly between 2 and 5 , its not constant

I thought about doing an if condition for each choice but that will be a lot of code to write and it wont be efficient for my application

Source Link
user730
  • 51
  • 1
  • 3

LCD scrolling down problem

I have a list of set-ups and I only have 2 rows in the lcd , I'm trying to scroll down for the moment and Im doing this by changing the row in the setcurseor function to either 0 or 1 .

However since that Ill be having about 10 set-ups I used an equation that will change the rows to 0 and one for the ones I want to display and a negative number for those that I dont want to appear . The problem is when setting the cursor's row to -1 or 2 it will ignore the one with row one (which is the 2nd row )

is there a way that I can overcome this problem ? by setting it to a row that will not appear on my lcd ?

      int  colom[5] = {
    0-goDown,1-goDown,2-goDown,3-goDown,4-goDown  };
for (int i = 0; i < 4; i++) {
    if (colom[i] > 1) colom[i] = -1;
}

  lcd.setCursor(0, colom[0]);
  lcd.print("choise 1 ");
  lcd.setCursor(0, colom[1]);
  lcd.print("choise 2 ");
  lcd.setCursor(0, colom[2]);
  lcd.print("choise 3 ");
  lcd.setCursor(0, colom[3]);
  lcd.print("choise 4 ");
  lcd.setCursor(0, colom[4]);
  lcd.print("choise 5 ");

so here goDown is 0 so choice 1 and 2 should appear , but Im only getting choice 1 and in the second row its changing quickly between 2 and 5 , its not constant

I thought about doing an if condition for each choice but that will be a lot of code to write and it wont be efficient for my application