Build a Mini-Sized Arduino Based Tamagotchi
by tienbvan in Circuits > Arduino
606 Views, 2 Favorites, 0 Comments
Build a Mini-Sized Arduino Based Tamagotchi

Note: The yellow-colored breadboard I used to make for this tutorial was broken so I swapped it with the blue color. But, it shouldn't affect the overall process.
Topic and Background
Made in Japan in 1996 and popularized in the United States in 1997, Tamagotchi , or "Egg Watch", is a lightweight, pocket-sized virtual companion watch. It offers various activities ranging from dressing, eating, sleeping, and playing, all accessible through user interacting with buttons.
Overview
This beginner guide will cover:
- Understanding of circuit component (breadboard, Arduino Elegoo Uno) label
- Locating labeled spot for wire placement on breadboard.
- Downloading, compiling, and uploading code for powering Arduino Uno hardware.
- Troubleshooting software and hardware issues.
Scope
This guide does not include neither in-depth explanation of how each wiring system works nor how to operate Arduino Uno's IDE for compiling code.
Audience
This guide require familiarity with Arduino Uno's hardware, IDE, and wire connection on breadboard.
Supplies

Note: The number wire you see in the picture are miscounted, some are not accounted, labeled ** are the fixes
x1 0.96in OLED Display Screen Module (3 totals)
Within the kit, we only need:
- x1 OLED Display Screen
x1 Pin Breadboard Jumper Wires Kit
Within the kit, we only need:
- x6 1.97in wires (grey) **
- x4 0.98in wires (blue) **
- x3 0.20in wires (blue) **
- x1 0.39in wires (grey) **
- x1 0.59in wires (red)
- x1 0.79in wires (green) **
x1 Buzzer 3V Magnetic (10 totals
Within the kit, we only need:
- x1 buzzer
x1 Mini Breadboard 170 Points (6 totals)
Within the kit, we only need:
- x1 mini breadboard
x1 6x6x5 (mm) Momentary Tactile Push Button Switch (120 totals)
Within the kit, we only need:
- x3 tactile push button switch
Additional: for any USB C computer ports (macbook pro/air, etc)
Set Up Resources
Before you start, make sure you are downloading the following for the instructions:
Arduino IDE (Download whichever applications that is compatible with your laptop/computer)
Within the IDE, download the following libraries in 'Library Manger' tab:
Note: Upon downloading the following libraries, if the Arduino IDE ask to download necessary libraries along with it, then allows it to download them.
- Adafruit GFX Library
- Adafruit SSD1306
- CuteBuzzerSounds
GitHub code (Download as ZIP)
Quick Glimpse at Hardware Component Label



After setting up, it is important that you kept a keen eye on the component label, as messing up the wiring will likely stalled the overall development progress:
- At the breadboard, you can see rows are read in alphabetical order and columns are read in ascending numerical order.
- A4 -> A5 refer to connecting [rows A, column 4] to [rows A, column 5].
- On both side of Arduino ELEGOO UNO R3, we have:
- POWER / ANALOG IN side:
- A4 -> [ANALOG IN] A1 refer to connecting [rows A, column 4] to [Analog In] A1.
- A4 -> [POWER] Vin refer to connecting [rows A, column 4] to [Power] Vin.
- DIGITAL (PWM~)
- A4 -> [DIGITAL (PWM~)] 10~ refer to connecting [rows A, column 4] to [Digital (PWM~)] 10~.
Mount Breadboard Onto Arduino Elegoo Uno R3

Begin by peeling off the masking tape underneath the breadboard.
Tape the breadboard on Arduino, toward the POWER / ANALOG IN side.
Wire the Breadboard to Arduino's Power/Analog in Side


Following the previous step, proceed to connecting wire between the breadboard and POWER / ANALOG IN side of Arduino Uno:
Warning: Avoid plugging the wire too deep into the component, as doing so may cause permanent damage to the hardware component. As a result, a new replacement will be needed.
Breadboard:
- A11 -> A4
- A12 -> A5
POWER / ANALOG IN side:
- A13 -> Vin
- A14 -> Vnd
Connect Wire Within Breadboard


Next, we shift gear toward wiring within the breadboard component. Now, perform the following:
Breadboard:
- J3 -> J2
- G8 -> D2
- D4 -> D3
- I6 -> I5
- J6 -> J9
- H8 -> G12
POWER / ANALOG IN side:
- A5 -> GND
Wire the Breadboard to Arduino's Digital (PWM~) Side


For the last wiring process, complete the following:
DIGITAL (PWM~)
- I10 -> 2
- H12 -> 5~
- I7 -> 12
- I4 -> 11~
- I1 -> 10~
Embed Buttons Onto Breadboard

Button allows you to interact with the Tamagotchi. Follow these instructions to mount button correctly:
Template
{upper_left_leg upper_right_leg
lower_left_leg lower_right_leg}
Steps
{E7 E5
F7 F5} -> 1st button
{E3 E1
F3 F1} -> 2nd button
{G4 G2
I4 I2} -> 3rd button
Mount OLED Display Screen and Buzzer

Finally, attach 0.96in OLED display screen and Buzzer onto the breadboard:
OLED Screen
- B11 - B12 - B13 - B14 (consecutively)
Buzzer
- B5 -> C2
Connect Arduino to the Computer Port

Note: In early development stage, it is essential to diagnose both component (breadboard and Arduino Uno) to ensure no trouble arrives later on.
When connected with the laptop/computer, a green light and orange light flashes must appear on the Arduino Uno. It means that the component connected successfully.
To troubleshoot:
- Unplug the cord that connect to the laptop/computer.
- Plug in back in again to see if the light turn on.
- If it does, you are good.
- If it doesn't, replace the Arduino Uno and complete necessary rewire.
Upon connection, the buzzer should also play a quick "BEEP!" sound. If it doesn't, it suggest the issues with either wiring component or breadboard.
To troubleshoot:
- Unplug the cord that connect to the laptop/computer.
- Plug in back in again to see if the buzzer make noise.
- If it does, you are good.
- If it doesn't, inspect the wire and if nothing is wrong, then replace the breadboard.
Upload the Code to the Arduino

Note: If you are already familiar with Arduino IDE, the remaining steps are:
- Download GITHub code.
- Open Arduino Uno IDE, then open downloaded code (.ino) file.
- Verify/Compile the code.
- Upload the code.
Credits:
Project concept and idea: Tiktok user @hack_updt
Code: GitHub user @Aquets.Repository: https://github.com/Aquets/My_arduino_tamagotchi