Need help with simple arduino code

Hello!

I'm learning how to use arduino by myself.

Im wondering how do I print alphabet in order to 16x2 lcd screen in a way that every character goes in to the next slot and it goes around the screen over and over again?

So in a way that after 15,0 slot, it jumps to 15, 1 and goes backwards to 0,1 and then back to 0,0. And repeat.

What LCD are you using? What Arduino board?

Have you managed to get any example programs working?

Programs you found offered as examples that you did not modify?

Until you see something on the LCD it is too soon to start worrying about whatever thing you've challenged yourself with.

What kind of things have you written or experimented with from example code meant for beginners?

a7

Hi @polo_vasti

Welcome to the Arduino Forum!

I agree with @alto777, we need some more info.

FYI, the official Arduino I2C liquid crystal library has these two functions to scroll characters:

void scrollDisplayLeft();
void scrollDisplayRight();

This is my code so far, and im getting it to loop row by row... But I want it to go around the lcd.

#include<LiquidCrystal.h>
#define del 200
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
char s;
int i = 64;
int x = 0, y = 0;
void setup() {
lcd.begin(16, 2);

}
void loop() {
  
    for (x = 0 ; x <= 1 ; x++) {
      
            for (y = 0 ; y <= 15 ; y++) {
              
                    if (i < 91)
                        i++;
                            if(i==91)
                                i=65;   
        						s = i;
      							lcd.setCursor(y, x);
        						lcd.print(s);                               
      							delay(del);
      							lcd.clear();
            					}
										}
    delay(100);
			}```

yes your loops and logic are printing a character at an x y position on the LCD. running through the alphabet a..z or is it A..Z.

Dunno what you want to see, but it will be a matter of getting the right x and y happening.

If it isn't the alphabet you want to see, you'll have to come up,with the characters you actually want to place on the LCD with logic nowhere to be seen in your program yet.

Please try to describe what you mean.

a7

do you want to delay after writing each character or after a complete cycle has completed?

So I want the alphabet to go around the lcd. And I want a little delay between characters but the loop can go around seamlessly.

I'll try to explain what I want a bit better...

So the first character "a" will print in 0,0 position and from there they will move to 15,0 position. After that I want the next character to jump in 15,1 position and move rightToLeft until they reach 0,1 position. After that the loop starts again from 0,0 position.

can you illustrate
like this?

a_______________
________________

_a______________
________________

...
_______________a
________________

________________
_______________a

________________
______________a_

...

________________
a_______________

Yes exactly like this.