DEV Community

Cover image for MIABY Project - A Desktop Python Application using Kivy Framework
Christian Guaman
Christian Guaman

Posted on

MIABY Project - A Desktop Python Application using Kivy Framework

MIABY Project - A Python Application using Kivy Framework

In my journey of learning how to create solutions for people, I have always believed the best path to learn is work in real projects. This project was a collaboration in the software side to build a device which is able to show different didactics for children about basic knowledge about English and Spanish language using videos, images and text.

The device is a Bear made of wood, it has a self-made keyboard, a card reader(MFRC522), a screen monitor, and a Raspberry Pi as a platform where all the software is executed.

Device assembling

Wooden front part

In the program, there are 3 main didactics-features:

  • Observe: Show a random video about tales.
  • Learn: Show musical videos about basic concept of the language.
  • Interact: Allow to read a card which is linked with a word, then the child can press the keys and introduce the letters corresponding to complete the word selected.

MIABY App Example

My directory structure is arranged as follows:

  • resources: Media used for screens like images, videos, audios and data(Media files uploaded to the repository are only examples to test).
  • scripts: Little piece of code to use card reader MFRC522.
  • src: Contains code about every screen.
  • main.py: It’s the main part of the program, it contains how have to behave each screen.
  • miaby.ini: Configuration file of Kivy App.
  • Pipfile: To develop, I create a virtual environment using Pipenv which create a Pipfile where all requirements are defined.

But How it works? Well, first, all behaviors of screens reside on the main.py file where I can have access to all screens and their methods and variables. To explain these behaviors, I’ll describe each screen with its function.

  • Welcome: Show an image before enter to Home screen. At this point, the input keyboard is defined, it can be from our computer or Rasperry Pi’s GPIOs, so you can interact with the program with these key(up, down, enter, left, right).
  • Home: Here you can choose a language between Spanish and English. When you choose one, this will update all screens to the proper image(Backgrounds and buttons). Also, the words will load in a variable for use in the Interact game mode base on language selected.
  • Game Mode: In this screen, it shows three options mentioned before Observe, Learn and Interact. When select Observe or Learn options redirect to show video screen, and for Learn it will be Read Card.
  • Show Video: It shows the proper video, base on language and game mode options. When the video ends, it comes back to Game Mode screen.
  • Read Card: When this screen is called and the program is running over a Raspberry Pi, and begin to read a card. Otherwise, if we are running the program in our computer automatically will select the word “SQUARE” and next will show Text Input screen.
  • Text Input: Here, we can use the keyboard to introduce the correct letters to complete the selected word. We can pass to the next screen only if we complete the word.
  • Message: It shows a message when complete the word succesfully.
  • Screensaver: When the user doesn't interact around 2 minutes, this screen will be shown and when you press enter it come back to Home screen.
  • Also, in every interaction in order to change the screen, a sound effect will be played.

Here is my code, if you are interested you can test it.

MIABY_Project - GitHub

This project put me in an entertaining challenge to apply all my knowledge to create a solution based on user requirements because I needed to understand how to work with software and hardware. In the end, I was able to put all together and made it work. I hope this is interesting for someone. I really enjoyed creating this project, I know I have a lot to learn and improve, but I'll keep going.

Note: Sorry by my English, I'm learning.

Top comments (0)