An example of what can be done with my LCD Animation Library for Arduino.
Using an Arduino Liquid Crystal Display (LCD) and a joystick, the player is able to swim around the screen like a Koi fish.
Some "features":
- You can variate speed with joystick position
- You can spawn a worm
- You can eat the worm
- If you don't touch the joystick, the fish swims by itself
- If you spawn a worm when the fish is swimming by itself, it will chase and eat the worm
See it for yourself in the video below!
In order to run the program, you must have access to the following:
The wiring portion uses this tutorial for LCD and this tutorial for the joystick controller. Note, the potentiometer is required because it allows you to regulate the brightness of the screen. For exact wiring, see the diagram below.
After you have connected the LCD and joystick to your Arduino, you can upload and run the code.
- If you haven't already, install the LCD Animation Library.
- Download the repository.
git clone https://github.com/Vladnet47/LCD-Koi-Fish.git
- Open src/KoiFish/KoiFish.ino using the Arduino IDE.
- Select the correct Board and Port under Tools.
- Upload the sketch to your board.
There are two main controls to the game.
- Move the joystick to swim with the fish.
- Click the joystick to spawn a worm in a random location.
The Arduino LCD only permits eight custom characters. The fish utilizes six and the worm utilizes two (at most). There simply is not enough onboard memory on the display, which is truly a shame, because it would be a simple addition with the LCD Animation Library.
Purchase Arduino Microcontroller