Hello. I made this project https://create.arduino.cc/projecthub/PunkyMunky64/lcd-hill-run-v2-runner-game-1b0523
I like it a lot. But I kind of got bored with the game and I wanted to make my own. So how do I code it? The only usefull thing I could find was making charecters but what about the speaker and buttons and everything? How do I code my own games and stuff? my whole setup has two push buttons and a speaker. So how do I code them and make my own game on the lcd?
You could try Google, "How to code a game".
Not a good link. Helpers work for free and spending time digging/tracking down Your link is too much to ask for, for me. Read and analyse the code You've been running and pick up the important things.
I tried that but I don't know what anything even is. Google is also bad I can't find anything usefull except Arduino LCD Set Up and Programming Guide
But its not really for games. Can you like...actually teach me it?
No. You need to join some educational path.
There are cources in programming, beginners kits with examples and advices, that would be much better.
Arduinos are coded in C++, so for starters you have to know programming as a concept, and that language as a way to implement your logic.
Then you have to learn how to deal with the inputs (buttons or whatever that game uses), and the outputs (the LCD display) and how to make the two work together.
When you're done with that, all that's left is the hard part: a good game idea and a good implementation of it.
Writing code to control 1602 displays is straightforward. There are tons of google results for that
However, parallel hardware interfacing can be tricky (needing up to 12 wires) so I would suggest you buy an I2C interface module. They are made specifically for this purpose and only need 2 wires.
Or you can buy a serial 1602 (that has the I2C module already connected to the display)
There are a specific arduino libraries to drive the display. You need 2 libraries:
Wire.h (this enables the I2C interface)
LiquidCrystal_I2C.h (this allow you do drive the connected display).
For buttons, this is basic arduino functionality
What other have said is spot on. You need to learn how to code the arduino (a variant of C++).
If you want to nicely mount the 1602 so it looks more pro, then (big disclaimer) I make bezels for the 1602.
bezelsanddisplays:
If you want to nicely mount the 1602 so it looks more pro, then (big disclaimer) I make bezels for the 1602.
So it appears!
We advise you do not attempt to use LiquidCrystal_I2C.h, but rather install the "HD44780" library from the Library Manager in the IDE and practice with the examples given with it.
Paul__B:
We advise you do not attempt to use LiquidCrystal_I2C.h, but rather install the "HD44780" library from the Library Manager in the IDE and practice with the examples given with it.
Using the HG44780 library in several projects I fully agree. The advice I once got from helpers here, and I never regretted it, never had any problems with it.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.