Hello, I've run into a challenge in my project. I'm working on the dino chrome game where I want the dinosaur character to remain stationary on a 16x2 LCD display (PIC16F877A), while the obstacles continuously shift to the left. Unfortunately, I've hit a roadblock and could use some guidance on what steps to take next.
Below is the code I've written so far. Additionally, I've attached a header file containing functions like Lcd8_Write_Char and Lcd8_Set_Cursor.
//dino_lcd();
Lcd8_Set_Cursor(2,1);
Lcd8_Write_Char(105); //dinosaur figure for now
Lcd8_Set_Cursor(2,7);
Lcd8_Write_Char(219); //obstacle feature for now
for (int i=0; i < 5 ; i++){
__delay_ms(1000);
Lcd8_Shift_Left();
}
Lcd8_Set_Cursor(2,12);
Lcd8_Write_Char(219); // second obstacle
for (int i=0; i < 5 ; i++){
__delay_ms(1000);
Lcd8_Shift_Left();
}
}
After resolving this issue, my plan is to implement using the button on the microcontroller. I want the dinosaur character to jump from its current position on the LCD to the top row.
Any assistance or advice you can provide would be greatly appreciated. Thank you