#include LiquidCrystal_I2C lcd(0x27, 16, 2); char strArr1[] = "HI! HELLO! YIPPEEEE!! SEE YOU ON MY SITE "; char strArr2[] = "NOOOO! BOOO, COME BACK !! T_T "; int pirValue; int pirPin = 8; void setup() { // put your setup code here, to run once: lcd.init(); lcd.backlight(); // printing to lcd lcd.setCursor(0,0); lcd.print(" CHXSHIRE22.COM "); Serial.begin(9600); // PIR pin setup pinMode(pirPin, INPUT); } void loop() { // put your main code here, to run repeatedly: if(digitalRead(pirPin) == HIGH){ Serial.print("DETECTED"); Serial.print("\n"); lcdScrollPrint(strArr1); }else{ lcdScrollPrint(strArr2); } } // for loop to print my intro character by character onto lcd screen for scroll. // idea is that the screen refreshes and first prints the whole string, then the next refresh print the string minus the current first character void lcdScrollPrint(char strArr[]){ int strArrLength = strlen(strArr); for(int i = 0; i < strArrLength; i++){ lcd.setCursor(0,1); String printing = ""; for (int j = 0; j < 16; j++) { int index = (i + j) % strArrLength; printing += strArr[index]; } lcd.print(printing); delay(300); } }