Hi everyone, I am new to Arduino programming. My condition is I want to counting up a value of i from 0 to infinity. At the same time, a calculation, b is needed to be performed when counting up the value. Can anyone can help me on it? Thanks.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
 lcd.begin(16, 2);
}
void loop() {
Â
 int i=0;
Â
 while (i>0){
  i++;
  lcd.setCursor(3,1);
  lcd.print(i);
 }
 b = i*2;
 lcd.print(b);
Â
}
srnet:
Which Arduino are you using, most of them have limited memory, and to run a counter that goes to infinity would require an infinite amount of memory.
I am using the Arduino UNO. I have done with the counting up part. However, I have encountered another part, after I put the calculation part, b into the while loop. The counting part will start from 90 instead of 0. Can I know how can I solve this? Thanks.