Introduction
Stress, fear of failure, and overwhelming situations affect everyone. They are part of being human. We set goals, try to improve ourselves, and sometimes things do not go as planned. It is easy to call these moments “failures,” but trying, learning, and gaining experience are not failures. Every attempt builds courage and teaches us something new.
Facing the fear of failing is one of the most important challenges we encounter. Every year we set goals and expectations for ourselves, and when we fall short, we may feel discouraged. But even the act of planning, trying, and taking small steps forward helps us grow and understand ourselves better.
That idea inspired me to build Yarviz – the Stoic Buddy, a small desk companion inspired by Stoic philosophy. The device helps you pause, reflect, and approach difficult moments with a calmer mindset. With over 30 unique responses and 10 voice commands, Yarviz offers short reflections and reminders drawn from Stoic ideas to help you think more clearly during stressful situations.
While Yarviz can help you reflect on everyday challenges, it is not meant to replace meaningful conversations with family, friends, or professionals. If stress or anxiety persists, talking to someone you trust is always important. Instead, this device serves as a small reminder on your desk—something that encourages you to pause, reflect on your thoughts, and approach challenges with a clearer perspective.
Components


These are the components and materials used to build Yarviz – The Stoic Buddy.
Hardware
- DFRobot UNIHIKER K10 microcontroller board
- ~14 g of PETG filament (for the 3D printed enclosure)
- USB cable (for power and programming)
- Micro SD Card (for assets)
Software
- PlatformIO development environment (used in this project)
- Arduino IDE (alternative option)
The code can be compiled and uploaded using either PlatformIO or Arduino IDE. The overall process and concept remain the same regardless of the environment you choose.
What Is Stoicism

Marcus Aurelius equestrian statue (copy on Capitoline Hill). Photo by Vebjørn Granum Kjersheim, licensed under CC BY-NC-SA 3.0.
Stoicism is a school of philosophy that focuses on developing control over our thoughts and reactions rather than trying to control external events. It teaches values such as virtue, resilience, and wisdom in order to achieve inner peace and live in harmony with the world around us.
Today, Stoicism is often misunderstood. Some people believe it means suppressing or ignoring emotions. In reality, Stoicism teaches the opposite: emotions are natural and important, but we should learn to understand them deeply so they do not control our actions. By reflecting on our emotions instead of reacting impulsively, we can make wiser decisions.
I chose Stoic philosophy as the inspiration for this project because it offers a powerful way to face one of the most common fears people experience: the fear of failure. Stoicism encourages us not to worry excessively about events that may happen in the future. Instead, it reminds us that even if something goes wrong, it does not define our worth or end our journey.
From a Stoic perspective, failure is not a source of shame. It is a necessary opportunity for learning and growth. Mistakes help us refine our strategies, improve our understanding, and become stronger individuals. Sometimes failure is simply part of the process of becoming better.
You can think of failure as information rather than defeat. It acts like a compass, pointing us toward a different approach. If you trip over a rock while walking toward your goal, your journey does not end there. The next time, you know where the obstacle is, and you can choose a better path forward.
Stoicism teaches us to focus on what we can control: our actions, our effort, and our attitude. The final result may not always be what we expected, but true success lies in the effort we make and the values we practice along the way.
Designing the Philosophy Engine
The initial idea behind this project was to create a small desk companion that reacts to specific commands and offers short reflections inspired by Stoicism.
The device works completely offline. No AI model is used to generate responses. Instead, the system contains more than 30 carefully written responses mapped to 10 emotional commands.
I intentionally avoided using an AI system for generating answers. While AI can be powerful, it can sometimes produce incorrect or misleading responses (often called “hallucinations”). Because this device is meant to provide thoughtful reflections, I wanted every response to be deliberately written and aligned with Stoic philosophy.
All of the responses were written manually using Stoic principles such as reflection, resilience, and focusing on what we can control. This approach makes the responses feel more consistent and intentional.
The commands were chosen because they represent common emotional states people experience in daily life.
Commands Used in the Stoic Buddy
- I am happy
- I am sad
- I am stressed
- I am afraid
- I am angry
- I am overwhelmed
- I made a mistake
- I cannot control
- I feel unmotivated
- Give me wisdom
- Play music
Each command triggers a short Stoic reflection designed to help the user pause, think, and approach the situation with a calmer mindset.
Music for Relaxation
The Play music command plays the full melody of Für Elise, composed by Ludwig van Beethoven. This classical piece is widely recognized for its calming and reflective tone.
Music has been shown to influence emotional and cognitive states. According to the research paper “The Transformative Power of Music: Insights into Neuroplasticity, Health, and Disease” by Muriel T. Zaatar and colleagues, music can significantly impact emotional wellbeing and may help reduce stress, anxiety, and depression.
If you are interested in the research behind this, you can read the full study here:
https://pmc.ncbi.nlm.nih.gov/articles/PMC10765015/
Understanding how music affects the brain adds another dimension to the Stoic Buddy, combining philosophical reflection with calming sound to help create a brief moment of pause during stressful situations.
Sketching the Stoic Buddy



To design the visual interface of the Stoic Buddy, I first created sketches of the different screen layouts and “faces” of the character Yarviz using Canva.
These sketches represent the different responses that Yarviz displays when the user gives a command. I wanted the interface to feel philosophical and reflective, so I chose a vintage-inspired design that evokes the atmosphere of classical philosophy.
Color Palette
The interface uses a simple color palette designed to create a calm and thoughtful visual experience:
- Background: 0xEBDDAB
- Title and dialogue box: 0x8A3F35
- Text: 0x2F3145
These colors help create the feeling of reading an old philosophical text while interacting with the device. The dialogue box was intentionally designed to look like Yarviz is speaking, making the interaction feel more personal and engaging.
Designing for the Screen Size
One important detail when designing the interface is to match the canvas size to the device’s screen resolution.
For example, the DFRobot UNIHIKER K10 has a screen resolution of 240 x 320 pixels, so I created my Canva design using the exact same dimensions.
Designing at the correct resolution makes it much easier to:
- Position elements correctly
- Replicate the layout in code
- Ensure the interface looks exactly as intended on the device
At this stage, the goal was mainly to determine the placement of visual elements, such as the title area, the dialogue box, and the text area where the Stoic reflections would appear.
In the next steps, I will explain how the philosopher character was created and how the quotes and responses were integrated into the system.
Designing the Stoic Buddy Enclosure

For the enclosure design, I reused a concept similar to one from my previous project, Zecko ES. My goal was to create a case inspired by the busts of ancient Roman philosophers, giving the device a visual connection to Stoicism and classical philosophy.
Originally, I planned to print the final version using marble filament to better resemble a classical sculpture. However, since I did not have that filament available at the moment, I created a temporary version and will later print the final stand when the material becomes available.
Why This Design
There are already several cases available online for the DFRobot UNIHIKER K10. However, many of those designs have some practical limitations:
- They fully enclose the board
- They cover the bottom circuitry
- They block access to sensors
- They restrict speaker output
- They partially obstruct the Wi-Fi module
This enclosure was designed specifically to avoid those issues, keeping all the important hardware features accessible while still protecting the device.
3D Printing Settings
These are the settings I used to print the enclosure.
Printer: Flashforge Adventurer 5M
Material: ABS (other materials such as PETG or PLA also work)
Recommended settings:
- Layer height: 0.2 mm
- Infill: 15–20%
- Supports: Not required
- Bed adhesion: Optional (a brim is recommended when printing with ABS)
Assembly
The enclosure is designed as a press-fit case, meaning no screws are required.
To assemble it:
- Align the board with the front opening of the enclosure.
- Insert the board carefully.
- Apply gentle pressure until the board is fully seated.
Once inserted, the board should remain securely in place while still allowing access to the sensors, speaker, and other components.
Preparing the Wisdom Assets (Quotes & Visuals)



One of the most important parts of this project is the content used to give Yarviz its personality. This includes both the visual assets for the character and the Stoic reflections that the device displays in response to commands.
Creating the Character Assets
For the character visuals, I used the generative capabilities of ChatGPT with DALL·E to generate pixel-style artwork of a philosopher bust.
This approach allowed me to quickly prototype a character that fits the philosophical theme of the project.
Some of the prompts used were:
- "Create an 8-bit philosopher head sculpture asset with transparent background."
- "Use the exact same asset and make a thinking expression."
I repeated the process to generate multiple expressions so the character could visually react to different emotional commands.
After generating the images, I imported them into Canva to clean them up. Using Canva’s background removal tool, I made the images fully transparent and resized them to 192 × 192 pixels so they would fit well on the screen of the DFRobot UNIHIKER K10.
Writing the Stoic Responses
The second part of the assets is the Stoic reflections that Yarviz displays. These responses were written using a combination of personal reflections and ideas inspired by classical Stoic texts.
If you are interested in learning more about Stoic philosophy, I highly recommend reading:
- Meditations by Marcus Aurelius
- Letters from a Stoic by Seneca the Younger
These works provide timeless insights about resilience, emotional control, and personal growth.
Below are a few examples of the responses implemented in the Stoic Buddy system. The complete list of responses is included in the code section and on my GitHub repository.
Happy
“Amazing! We both know life can be hard, and these happy days are what help carry us through. Cherish them and share that happiness with the people you love.”
Sad
“That's unfortunate. Life can be rough sometimes, but those challenges can make us stronger when we overcome them. Tomorrow will be a better day.”
Stressed
“Remember that you have power over your mind, not outside events. Realize this, and you will find strength.”
Afraid
“It's okay to be afraid. Fear is a natural human instinct. The best way forward is often to face it step by step.”
Angry
“Inner control is important. Do not let anger control your actions or your thinking. We are often disturbed by our own view of things.”
All of these responses aim to reflect the central Stoic idea that while we cannot control everything that happens to us, we can control how we respond to it.
Setting Up the Development Environment

In this section, I will guide you step by step through setting up the development environment so you can replicate the Stoic Buddy project exactly.
For this project, I used PlatformIO, which runs as an extension inside Visual Studio Code.
1. Install Visual Studio Code
First, download and install Visual Studio Code from the official website:
https://code.visualstudio.com/
Follow the installation instructions for your operating system. Once the installation is complete, open Visual Studio Code.
2. Install PlatformIO
Next, we need to install PlatformIO.
- Open the Extensions panel in Visual Studio Code.
- Search for PlatformIO.
- Install the extension called PlatformIO IDE.
PlatformIO is a powerful development environment for embedded systems. While it has a slightly steeper learning curve than the Arduino IDE, it provides better project management, library handling, and build tools.
After installing the extension, restart Visual Studio Code.
You should now see an alien icon in the sidebar — this is the PlatformIO interface.
3. Import the Project
Click the PlatformIO icon in the sidebar.
Under Quick Access, select Open Project and import the project folder.
You can clone or download the project from my GitHub repository:
https://github.com/jorgeeldis/stoicbuddy
Once the folder is opened, PlatformIO will automatically detect the project configuration.
4. Configure the Board
Inside the project folder, open the file called platformio.ini and add the following configuration for the DFRobot UNIHIKER K10:
[env:unihiker_k10]
platform = unihiker
board = unihiker_k10
framework = arduino
After saving the file, PlatformIO will begin downloading the necessary tools and libraries required for the board.
5. Upload the Code
Once the setup process is complete, connect your UNIHIKER K10 using a USB cable.
You can now compile and upload the program directly to the board using PlatformIO.
Your development environment is now ready, and you can start building and uploading your own firmware for the Stoic Buddy.
NOTE
If you are using Arduino IDE and don't know how to use this project don't hesitate to contact me, or comment down below and i'll gladly help you through the process.
Also you can check out the Unihiker K10 for the process:
https://www.unihiker.com/wiki/K10/GettingStarted/gettingstarted_arduinoide/
Programming the Stoic Wisdom

Now for the technical part of the project, i'll explain carefully the functions, libraries used in this project so you can also replicate it, or even make it better! Keep in mind this project is fully open source so you're free to use it and modify it.
You can also clone the entire repository here: https://github.com/jorgeeldis/stoicbuddy
Project Structure
This is the structure used for the libraries, assets and main app:
StoicBuddy
---assets
------images.png (images in 192x192)
------furelise.wav (classical music in wav to import to the Unihiker K10)
---include
---lib
------StoicResponses
---------StoicResponses.h (library with the answer variables)
---------StoicResponses.cpp (code with all the answers, recommendations and quotes)
---src
------main.cpp (main code with all the functions)
---platformio.ini (main configuration for the project)
Uploading assets to Unihiker K10
As your first step, format the Micro SD Card to FAT32, you can do this with many applications or even the system defined format option.
On Windows:
- Connect the SD card to your PC.
- Open File Explorer and click "This PC".
- Right-click the SD card drive and select Format.
- Under "File system," select FAT32.
- Ensure Quick Format is checked and click Start.
On MacOS:
- Connect the card and open Disk Utility (via Spotlight or Applications/Utilities).
- Select your MicroSD card in the left sidebar.
- Click Erase in the top menu.
- In the format dropdown, select MS-DOS (FAT).
- Click Erase.
On Linux:
- Check where your Micro SD Card is with: lsblk (Look for your SD card based on its size (e.g., /dev/sdb, /dev/mmcblk0). The partition will be numbered (e.g., /dev/sdb1 or /dev/mmcblk0p1)
- Unmount it: sudo umount /dev/sdb1
- Format it: sudo mkfs.vfat -F 32 /dev/sdb1
After doing this, introduce the Micro SD Card into the Unihiker K10, and power up the Unihiker K10, this is for it populate the Micro SD Card with the necessary files and recognize it.
Disconnect the Unihiker K10 and plug it into the computer, load up the assets into the root of your Micro SD Card, and your done!
Libraries
The libraries used in this project are the following:
- unihiker_k10.h (library used for the unihiker k10 specific functions)
- asr.h (library used for the voice recognition)
- StoicResponses.h (library used for the answers)
#include "unihiker_k10.h"
#include "asr.h"
#include "StoicResponses.h"
void commands();
void philosopher(String emotion);
void answer(String msg);
void showCommands();
UNIHIKER_K10 k10;
Music music;
ASR asr;
uint8_t screen_dir = 2;
int idle = 0;
bool musicStop = false;
bool sleepingstate = false;
String neutral = "S:/philosopher192x192.png";
String happy = "S:/philosopherhappy192x192.png";
String sad = "S:/philosophersad192x192.png";
String sleeping = "S:/philosophersleeping192x192.png";
String talking = "S:/philosophertalking192x192.png";
String think = "S:/philosopherthink192x192.png";
void setup()
{
k10.begin();
randomSeed(analogRead(A0));
int randomgreeting = random(0, 3);
asr.asrInit(ONCE, EN_MODE, 6000);
delay(2000);
commands();
k10.initScreen(screen_dir);
k10.creatCanvas();
k10.initSDFile();
k10.setScreenBackground(0xebddab);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(neutral);
k10.canvas->canvasRectangle(20, 230, 205, 80, 0x8A3F35, 0xebddab, false);
answer(StoicResponses::greetings[randomgreeting]);
k10.canvas->updateCanvas();
}
void loop()
{
idle++;
delay(1000);
if ((k10.buttonA->isPressed()))
{
showCommands();
}
if ((k10.buttonB->isPressed()))
{
idle = 0;
int randomgreeting = random(0, 3);
k10.canvas->canvasClear();
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(neutral);
k10.canvas->canvasRectangle(20, 230, 205, 80, 0x8A3F35, 0xebddab, false);
answer(StoicResponses::greetings[randomgreeting]);
k10.canvas->updateCanvas();
}
if (asr.isDetectCmdID(1))
{
k10.canvas->canvasClear();
int randomhappy = random(0, 3);
int randomhappyrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::happyness[randomhappy]);
delay(1000);
answer(StoicResponses::happynessrecom[randomhappyrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(happy);
idle = 0;
}
if (asr.isDetectCmdID(2))
{
k10.canvas->canvasClear();
int randomsadness = random(0, 3);
int randomsadnessrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::sadness[randomsadness]);
delay(1000);
answer(StoicResponses::sadnessrecom[randomsadnessrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(sad);
idle = 0;
}
if (asr.isDetectCmdID(3))
{
k10.canvas->canvasClear();
int randomstress = random(0, 3);
int randomstressrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::stress[randomstress]);
delay(1000);
answer(StoicResponses::stressrecom[randomstressrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(think);
idle = 0;
}
if (asr.isDetectCmdID(4))
{
k10.canvas->canvasClear();
int randomafraid = random(0, 3);
int randomafraidrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::afraid[randomafraid]);
delay(1000);
answer(StoicResponses::afraidrecom[randomafraidrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(think);
idle = 0;
}
if (asr.isDetectCmdID(5))
{
k10.canvas->canvasClear();
int randomangry = random(0, 3);
int randomangryrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::angry[randomangry]);
delay(1000);
answer(StoicResponses::angryrecom[randomangryrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(sad);
idle = 0;
}
if (asr.isDetectCmdID(6))
{
k10.canvas->canvasClear();
int randomoverwhelmed = random(0, 3);
int randomoverwhelmedrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::overwhelmed[randomoverwhelmed]);
delay(1000);
answer(StoicResponses::overwhelmedrecom[randomoverwhelmedrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(think);
idle = 0;
}
if (asr.isDetectCmdID(7))
{
k10.canvas->canvasClear();
int randommistake = random(0, 3);
int randommistakerecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::mistake[randommistake]);
delay(1000);
answer(StoicResponses::mistakerecom[randommistakerecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(happy);
idle = 0;
}
if (asr.isDetectCmdID(8))
{
k10.canvas->canvasClear();
int randomnocontrol = random(0, 3);
int randomnocontrolrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::nocontrol[randomnocontrol]);
delay(1000);
answer(StoicResponses::nocontrolrecom[randomnocontrolrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(think);
idle = 0;
}
if (asr.isDetectCmdID(9))
{
k10.canvas->canvasClear();
int randomunmotivated = random(0, 3);
int randomunmotivatedrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::unmotivated[randomunmotivated]);
delay(1000);
answer(StoicResponses::unmotivatedrecom[randomunmotivatedrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(think);
idle = 0;
}
if (asr.isDetectCmdID(10))
{
k10.canvas->canvasClear();
int randomwisdom = random(0, 3);
int randomwisdomrecom = random(0, 3);
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer(StoicResponses::wisdom[randomwisdom]);
delay(1000);
answer(StoicResponses::wisdomrecom[randomwisdomrecom]);
delay(1000);
answer("Is there anything else you want to talk about?");
philosopher(happy);
idle = 0;
}
if (asr.isDetectCmdID(11))
{
k10.canvas->canvasClear();
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
philosopher(think);
answer("Thinking...");
delay(1200);
philosopher(talking);
answer("Here is some music for you to relax. It's one of my favorites, please enjoy. If you want to talk to me again, please restart the device.");
delay(1000);
philosopher(happy);
music.playTFCardAudio("S:/furelise.wav");
idle = 0;
}
if (idle == 30)
{
k10.canvas->canvasClear();
k10.canvas->canvasText("Stoic Buddy", 50, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 12, true);
sleepingstate = true;
philosopher(sleeping);
answer("Zzz...");
}
}
void showCommands()
{
idle = 0;
k10.canvas->canvasClear();
k10.canvas->canvasText("Commands", 10, 30, 0x8A3F35, k10.canvas->eCNAndENFont24, 9, false);
k10.canvas->canvasText("- I am happy -", 10, 60, 0x2F3145, k10.canvas->eCNAndENFont16, 15, false);
k10.canvas->canvasText("- I am sad -", 10, 80, 0x2F3145, k10.canvas->eCNAndENFont16, 13, false);
k10.canvas->canvasText("- I am stressed -", 10, 100, 0x2F3145, k10.canvas->eCNAndENFont16, 18, false);
k10.canvas->canvasText("- I am afraid -", 10, 120, 0x2F3145, k10.canvas->eCNAndENFont16, 16, false);
k10.canvas->canvasText("- I am angry -", 10, 140, 0x2F3145, k10.canvas->eCNAndENFont16, 15, false);
k10.canvas->canvasText("- I am overwhelmed -", 10, 160, 0x2F3145, k10.canvas->eCNAndENFont16, 21, false);
k10.canvas->canvasText("- I made a mistake -", 10, 180, 0x2F3145, k10.canvas->eCNAndENFont16, 21, false);
k10.canvas->canvasText("- I cannot control -", 10, 200, 0x2F3145, k10.canvas->eCNAndENFont16, 21, false);
k10.canvas->canvasText("- I feel unmotivated -", 10, 220, 0x2F3145, k10.canvas->eCNAndENFont16, 23, false);
k10.canvas->canvasText("- Give me wisdom -", 10, 240, 0x2F3145, k10.canvas->eCNAndENFont16, 19, false);
k10.canvas->canvasText("- Play music -", 10, 260, 0x2F3145, k10.canvas->eCNAndENFont16, 15, false);
k10.canvas->updateCanvas();
}
void commands()
{
asr.addASRCommand(1, "I am happy");
asr.addASRCommand(2, "I am sad");
asr.addASRCommand(3, "I am stressed");
asr.addASRCommand(4, "I am afraid");
asr.addASRCommand(5, "I am angry");
asr.addASRCommand(6, "I am overwhelmed");
asr.addASRCommand(7, "I made a mistake");
asr.addASRCommand(8, "I cannot control");
asr.addASRCommand(9, "I feel unmotivated");
asr.addASRCommand(10, "Give me wisdom");
asr.addASRCommand(11, "Play music");
}
void philosopher(String emotion)
{
k10.canvas->canvasRectangle(50, 58, 150, 150, 0xebddab, 0xebddab, true);
k10.canvas->canvasDrawImage(20, 50, emotion);
k10.canvas->updateCanvas();
}
void answer(String msg)
{
String firstline = "";
String secondline = "";
String thirdline = "";
String fourthline = "";
String fifthline = "";
k10.canvas->canvasRectangle(10, 230, 220, 80, 0x8A3F35, 0xebddab, true);
for (int i = 0; i < msg.length(); i++)
{
if (i < 32)
{
firstline += msg[i];
k10.canvas->canvasText(firstline, 20, 235, 0x2F3145, Canvas::eCNAndENFont16, 34, false);
k10.canvas->updateCanvas();
}
else if (i >= 32 && i < 64)
{
secondline += msg[i];
k10.canvas->canvasText(secondline, 20, 248, 0x2F3145, Canvas::eCNAndENFont16, 34, false);
k10.canvas->updateCanvas();
}
else if (i >= 64 && i < 96)
{
thirdline += msg[i];
k10.canvas->canvasText(thirdline, 20, 261, 0x2F3145, Canvas::eCNAndENFont16, 34, false);
k10.canvas->updateCanvas();
}
else if (i >= 96 && i < 128)
{
fourthline += msg[i];
k10.canvas->canvasText(fourthline, 20, 274, 0x2F3145, Canvas::eCNAndENFont16, 34, false);
k10.canvas->updateCanvas();
}
else if (i >= 128 && i < 160)
{
fifthline += msg[i];
k10.canvas->canvasText(fifthline, 20, 287, 0x2F3145, Canvas::eCNAndENFont16, 34, false);
k10.canvas->updateCanvas();
}
}
}
#ifndef STOICRESPONSES_H
#define STOICRESPONSES_H
#include <Arduino.h>
class StoicResponses
{
public:
static const String greetings[];
static const String happyness[];
static const String happynessrecom[];
static const String sadness[];
static const String sadnessrecom[];
static const String stress[];
static const String stressrecom[];
static const String afraid[];
static const String afraidrecom[];
static const String angry[];
static const String angryrecom[];
static const String overwhelmed[];
static const String overwhelmedrecom[];
static const String mistake[];
static const String mistakerecom[];
static const String nocontrol[];
static const String nocontrolrecom[];
static const String unmotivated[];
static const String unmotivatedrecom[];
static const String wisdom[];
static const String wisdomrecom[];
};
#endif#include "StoicResponses.h"
// Try to reach 130 char, not more than 160
const String StoicResponses::greetings[] = {
"Hello friend. How was your day? How are you feeling? I'm always here to support you and help you navigate both the good moments and the difficult ones.",
"How are you doing today, friend? Is there something special you'd like to talk about today? Or would you like to listen to some relaxing music?",
"I was just thinking about you. Welcome back, my friend. What's on your mind today? Is something bothering you? How was your day?"
};
const String StoicResponses::happyness[] = {
"You seem happy! Today was a good day. I can see you're full of energy and eager to do many things. Channel all those emotions into something great.",
"There's nothing better than having a good day. Just remember that life is full of ups and downs, so take a moment to enjoy and appreciate these moments.",
"Amazing! We both know that life can be hard, and these happy days are what help carry us through. Cherish them, and share that happiness with people you love."
};
const String StoicResponses::happynessrecom[] = {
"Let's do some exercise! Use that great energy to burn some calories and take care of your health. And don't forget to drink some water on your way out!",
"I recommend going out and spending some time in nature. Even if you live in a city, try to find a park or spend some time near the ocean. Take a moment to chill",
"Let's share this amazing news with someone close to you. Believe me, happiness and kindness are contagious—they'll feel just as happy as you do right now."
};
const String StoicResponses::sadness[] = {
"That's unfortunate. Life can be rough sometimes, but those challenges can make us stronger when we overcome them. Tomorrow will be a better day—trust me.",
"Just as the famous Epictetus said: “Remember that it is not events that disturb people, but their judgments about them.” Take a moment to breathe and reflect.",
"Do not suffer before the crisis arrives. Many things trouble us more than they should, before they should, or even when they should not trouble us at all."
};
const String StoicResponses::sadnessrecom[] = {
"I know it may be difficult, but let's try something. Let's work out today—go for a walk or lift some weights. Scientifically, you'll almost certainly feel better afterward.",
"Music is the solution to many things, and having a bad day go to a good one is one of them, play your favorite beat up playlist and think about the good memories.",
"Text your loved ones—family or close friends—and share how your day went. I'm sure they'll listen and offer support or advice. Go out with them!",
};
const String StoicResponses::stress[] = {
"Remember that you have power over your mind, not outside events. Realize this and you will find strength.",
"It is important to understand that anything outside your control cannot be controlled. What you can control is how you think about it.",
"Stress often comes from our thoughts. We usually suffer more in our imagination than in reality."
};
const String StoicResponses::stressrecom[] = {
"Promise me you will take a few minutes to rest your mind. Stay away from social media for a while, grab a coffee, and read some literature.",
"Try some deep breathing: inhale for 4 seconds, hold for 7, and exhale for 8. This helps calm the nervous system and reduce stress.",
"Take a walk and stretch your legs. This helps release tension and endorphins while you listen to some relaxing music."
};
const String StoicResponses::afraid[] = {
"It's okay to be afraid. It makes us human, and it is a natural survival instinct. Sometimes the best thing we can do is conquer our fears step by step.",
"Remember that you gain strength, courage, and confidence every time you overcome a fear. Treat this as a challenge and face it.",
"I understand how you feel. Fear is a powerful emotion, but remember to never let fear control you."
};
const String StoicResponses::afraidrecom[] = {
"If you want to overcome this fear, create a small hierarchy of challenges. Start with the easiest one and slowly work your way up.",
"Try not to avoid your fear. Sometimes it is important to safely confront it so you can learn to cope and realize it may not be as scary as it seems.",
"Speak positively to yourself every day. Visualize yourself in a difficult situation and imagine handling it calmly."
};
const String StoicResponses::angry[] = {
"Never let your emotions get the best of you. Delay this feeling as much as you can and give yourself time to think things through.",
"Seek perspective. Imagine this event happening to someone else and try to feel sympathy rather than rage.",
"Inner control is important. Do not let anger control your actions or your thinking. We are often disturbed by our own view of things."
};
const String StoicResponses::angryrecom[] = {
"Take a timeout. Remove yourself from the situation, step outside your room, take a walk, and get some fresh air.",
"Channel this energy into an intense workout like running, jogging, walking, or lifting weights. Even squeezing a stress ball can help.",
"Take slow, deep breaths and listen to some of your favorite music. This can help improve your mood and calm your mind."
};
const String StoicResponses::overwhelmed[] = {
"I know the feeling. Everything seems to be piling up, and you don't know what to do. Let's pause for a moment and simply be in the present.",
"It's completely normal to feel overwhelmed. This often happens because of overthinking and having many tasks at once. Keep the following in mind:",
"Humans tend to have limits, even when thinking. It's important to keep this in mind when feeling overwhelmed. You need to pause what you're doing for a minute"
};
const String StoicResponses::overwhelmedrecom[] = {
"Divide your worries into what you can control (your thoughts, actions, and responses) and what you cannot (other people, outcomes, and the past). Discard the latter.",
"Instead of being paralyzed and doing nothing, focus on the absolute smallest step you can take right now. Start there and build up toward your final task.",
"When you feel overwhelmed, pause to regain composure rather than acting impulsively. Listen to some calm music, go for a walk, and leave your smartphone at home."
};
const String StoicResponses::mistake[] = {
"Let me tell you something: mistakes don't define who you are. What matters is getting up and fixing them with the best attitude possible. Believe this, and you'll be okay.",
"You must take responsibility for the actions you take. Even if you make a mistake, what matters is that you learn from it so you don't repeat it again.",
"Mistakes are part of the healthy lifestyle of someone who is trying. You'll gain wisdom by learning from them and grow into a better human being."
};
const String StoicResponses::mistakerecom[] = {
"Let's analyze the cause of your mistake, its root, and how the impact affects you or your environment. With this information, you can work toward a solution.",
"Sometimes it's good to seek feedback from a close friend or a colleague. Perspectives outside your own are valuable when analyzing a situation."
"Avoid self-blame and be compassionate with yourself. Don't treat yourself too harshly, everyone makes mistakes, and you will learn from them."
};
const String StoicResponses::nocontrol[] = {
"It's important to know what we have control over and what we don't. You can control your emotions, actions, and thoughts, anything else is external.",
"Don't let external sources dictate your life. What happens outside your control should not affect your emotions. Even though it's difficult, once you realize this, you can gain control over your mind.",
"A Stoic acts like an archer: they train, take aim, and shoot with maximum skill, but accept that a sudden gust of wind (external factors) may cause them to miss the target."
};
const String StoicResponses::nocontrolrecom[] = {
"Let's practice this: grab a notebook and write all the things you have control over on one side, and the things you don't have control over on the other side.",
"Walk out your emotions, sometimes we think we have control over external things, but we have to let these actions pass through and don't let us affect our life.",
"Practice some deep breathing techniques to let those unwanted thoughts pass. Many things we cannot control try to affect us, so stop what you're doing and take a moment to practice some breathing techniques"
};
const String StoicResponses::unmotivated[] = {
"Life is full of ups and downs, and days when we feel unmotivated are completely normal. It is important to keep our discipline strong.",
"We should not depend on motivation to push ourselves to do things. Discipline is what makes us do the things we sometimes feel we don't want to do.",
"Feeling like this is normal. However, you should get up and try once again. You can rest and take a few minutes to think, but once you're done, you must push through."
};
const String StoicResponses::unmotivatedrecom[] = {
"Make sure you rest today. Keep this day free from work and think about what to do in these scenarios, so that the next time you feel like this again, you can use your discipline in your favor.",
"Write down your why, connect with your deeper purpose or values, which helps sustain motivation even when tasks are challenging.",
"Let's make a routine, grab a notebook and try to build consistency to turn actions into habits, reducing the need for constant motivation."
};
const String StoicResponses::wisdom[] = {
"If you want to be happy, do not desire that things happen as you wish, but wish that they happen as they do. - Epictetus",
"Life is very short and anxious for those who forget the past, neglect the present, and fear the future. - Seneca",
"You have power over your mind, not outside events. Realize this, and you will find strength. - Marcus Aurelius"
};
const String StoicResponses::wisdomrecom[] = {
"If you wish to find more motivation, i recommend you to read the following book: Meditations by Marcus Aurelius.",
"If you wish to find more motivation, i recommend you to read the following book: Letters from a Stoic by Seneca.",
"If you wish to find more motivation, i recommend you to read the following book: Discourses, Fragments, Handbook by Epictetus."
};
Using the Stoic Buddy
In the following video i'll show you all the functionalities the stoic buddy have, using the voice recognition commands.
The purpose of the Stoic Buddy is simple: to help you face difficult emotions with thoughtful reflections and words of support when you need them most.
Many of the emotions we experience every day are connected to different forms of fear:
- Sadness — fear of loss
- Overwhelmed — fear of losing control
- Afraid — fear of danger
- Angry — fear of injustice
- Unmotivated — fear of failure
- Stressed — fear of uncertain future events
Inspired by the ideas of Stoicism, the Stoic Buddy encourages a simple but powerful habit: pause, reflect, and focus on what you can control.
By offering short reflections and reminders, the device acts as a small companion on your desk that helps you step back from stressful situations and think more clearly. Sometimes all we need is a moment of reflection to regain perspective.
The Stoic Buddy is not meant to replace conversations with friends, family, or professionals. Instead, it serves as a small reminder that challenges and fears are a natural part of life—and that we can face them with calm, resilience, and wisdom.
In the end, the goal of this project is not just to build a device, but to encourage a mindset: one that approaches life’s difficulties with patience, reflection, and courage.








