WoofWhimsy - a Digital Pet Dog

by vishalsoniindia in Circuits > Robots

407 Views, 1 Favorites, 0 Comments

WoofWhimsy - a Digital Pet Dog

1719372395187.jpg
1719334202899.jpg
1719334202917.jpg
1719165110671.jpg
1719372452539.jpg





Hello everyone!

We all love pets; playing with and treating them as family members brings confidence and joy to our lives. However, I see some problems for working people, as they don't get enough time to take care of their pets. They spend most of their time at work, and in most cases, workplaces don't allow pets on the premises. Additionally, what if someone is working far from home but still needs a pet or the presence of a pet to not feel lonely? So, I created WoofWhimsy, a digital pet dog.

By the way, subscribe to my YouTube channel for more projects like this. I also update my upcoming projects on Instagram.

What Is WoofWhimsy ?

"Woof" is associated with the sound of a dog, and "Whimsy" refers to a playful or fanciful idea, something lighthearted and imaginative. WoofWhimsy is a digital pet dog that interacts with the outer world through sensors, allowing users to play with it. It has motion and sound sensors that can detect movement around the device and the sounds.

How WoofWhimsy Works ?

The project utilizes the UNIHIKER board, equipped with sensors like an accelerometer, microphone, and light sensor to interact with the real world. Powered via Type C, it can be run using a charger or power bank, making it versatile for applications such as car dashboards

Importance of pet

Pets are invaluable companions, offering unconditional love and emotional support. They reduce stress and loneliness, improve physical health through activities like walking, and foster community interaction. Pets teach responsibility to children and provide comfort during challenging times. Their presence enriches our lives, promoting relaxation and emotional well-being. Whether it's the joy of playtime with a dog or the calming purr of a cat, pets enhance our daily experiences and strengthen the bonds within families and communities. They teach us empathy, responsibility, and the profound benefits of companionship, making them cherished members of our households and society as a whole.

Supplies

1719197043997.jpg
1719372070831.jpg

This is a simple project that doesn't require many supplies.

  • UNIHIKER Board (DFRoboot)
  • A type C cable
  • A 3D print Stand for UNIHIKER
  • A laptop for Programming

Features of the Pet

1719372070884.gif
1719372070874.gif
1719372070856.gif
1719372070866.gif
1719372070844.gif

WoofWhimsy features a total of 10 expressions and 5 interactions with the real world.

All the Expressions are given below.

  • happy
  • happy eye close
  • normal
  • wink
  • tongue out
  • cool
  • eye heart
  • kiss heart
  • sleep
  • confuse

The interactions are given below

  • Normal expressions
  • Sleep expressions
  • Cool expressions
  • Loving expressions
  • Dizziness expressions

Normal expressions

In this mode, the dog will change its expression randomly over time, selecting from a variety of expressions such as happy, happy with eyes closed, normal, wink, and tongue out.

Sleep expressions

In this mode, a light sensor is utilized; when the light falls below a certain threshold, the dog will go to sleep.

Cool expressions

In this mode, a sound sensor is used. When it detects a loud sound and the dog is not sleeping, it will wear sunglasses and try to appear cool.

Loving expressions

In this mode, when gently tapped or moved slowly, the dog will show some loving reactions.

Dizziness expressions

In this mode, if the device is moved quickly or shaken rapidly, the dog will display a dizziness reaction on the screen.

3D Print Design

2024-06-2021-03-59-ezgif.com-video-to-gif-converter.gif
3D_tnkercad.JPG
asas.png

The UNIHIKER board is unable to stand on its own, so a stand has been designed for it. When creating the stand, two considerations were taken into account: it should match the overall theme and also conceal the Type-C cable.

The stand design was created using TinkerCad, which is easy to use and took very little time to produce the 3D design.

The STL file is available on my GitHub. You can download it to print yourself or provide it to a 3D printing company for production.

GITHUB:- https://github.com/vishalsoniindia/WoofWhimsy-a-Digital-Pet-Dog



About the UNIHIKER

1719196974346.jpg
UNIHIKER-removebg-preview.png

UNIHIKER is an innovative single-board computer designed to offer developers a unique programming experience. It features a 2.8-inch touchscreen, Wi-Fi, Bluetooth, and a suite of sensors including light, accelerometer, gyroscope, and microphone. With a built-in co-processor, it supports various sensors and actuators via analog, digital, I2C, UART, and SPI interfaces.

Developers can quickly get started with pre-installed software, including a built-in Jupyter Notebook for programming directly through a web browser. Compatibility with VS Code, VIM, and Thonny expands programming options. The integrated PinPong library enables Python-based control of onboard and external sensors, while the SIoT service allows for MQTT-based data storage and real-time web access, all securely stored locally.

Compact, feature-rich, and user-friendly, UNIHIKER empowers developers to explore creative possibilities in learning, coding, and creating with ease.

Setting Up UNIHIKER

1719195681594.jpg
1719165110610.jpg
1719165110577.jpg

Setting up UNIHIKER is straightforward, using a Jupyter Notebook for programming in this project. Follow these steps below to enable Jupyter programming.

  1. Connect the UNIHIKER device to your PC.
  2. Wait for it to boot up and the home screen to appear.
  3. Press the HOME button to bring up the menu.
  4. Navigate to the Service Toggle option using the up and down buttons.
  5. Enable Jupyter in the Service Toggle and wait for it to activate.

This completes the setup on the device side; now we will proceed to file uploading and programming on the PC.

Uploading the Image

unihiker_ip.JPG
upload.JPG
select.JPG

After following the above steps, proceed to the PC.

Open your browser and type "10.1.2.3" in the address bar. The UNHIKER page will appear, giving you control over the device.

To upload images:

  1. Click on "File Upload".
  2. Enter the folder name "dog_faces". Be careful with the name, as incorrect naming may cause the code to crash.
  3. Click on "Click to Select File" and choose all 10 dog images downloaded from GitHub.

After uploading the images, proceed to the next step where the Python script will be uploaded.

GITHUB:- https://github.com/vishalsoniindia/WoofWhimsy-a-Digital-Pet-Dog

Uploading the Code

upload code.JPG
jupyter.JPG
images_files.JPG

Now it's time to upload the Python script to the board.

  1. Stay on the File Upload section.
  2. Remove the "dog_faces" folder name so that the folder name field is empty.
  3. Click on "Click to Select File" and choose the Python file, then click on "Upload".

To view all the files, go to the Service Toggle and click on "Open page in Jupyter" section. The next page will show the file selection for the board, where you can verify all the files and images.

Run Code on Startup in UNIHIKER

1719165110610.jpg
1719165110595.jpg
1719165110556.jpg
1719165110541.jpg

By default, the code won't run at startup. You need to enable auto boot.

  1. Power the UNIHIKER with a Type-C cable.
  2. Press the HOME button to enter the menu.
  3. Find and open the Service Toggle in the menu.
  4. Now enable the Auto Boot option.

Now the device will automatically start the last running code 5 seconds after booting. After enabling the auto boot option, run the program once so it can auto-run on boot.

  1. Find "Run Programs" in the menu and open it.
  2. Here, navigate to the /root/ directory where all the files were uploaded.
  3. Run the WoofWhimsy.py code and wait for it to show the dog face.

Now, it can be powered off and will run the program automatically 5 seconds after booting.

Testing

1719165110462.gif
1719165110476.gif
1719165110490.gif
1719165110508.gif

After uploading the code, testing it is important to ensure all the sensors are working correctly. There are 5 modes to test.

  • Normal expressions
  • Sleep expressions
  • Cool expressions
  • Loving expressions
  • Dizziness expressions

Normal expressions

In this mode, the dog will change its expression randomly over time. Just watch the dog for a few seconds, and it will change its expression automatically.

Sleep expressions

In this mode, a light sensor is utilized; when the light falls below a certain threshold, the dog will go to sleep. So, turn off the lights in your room or take the dog to a darker area to see the sleeping expression.

Cool expressions

In this mode, a sound sensor is utilized. When it detects a loud sound and the dog is not sleeping, it will wear sunglasses and try to appear cool. To activate this feature, play music or clap near the device, and it will wear glasses in response.

Loving expressions

In this mode, when you gently tap or move the dog slowly, it will respond with affectionate gestures and expressions, showing its loving nature.

Dizziness expressions

In this mode, if the device is moved quickly or shaken rapidly, the dog will react by displaying dizziness on the screen, simulating its disorientation.

Done

1719372395187.jpg
1719334202917.jpg
1719334202899.jpg
_storage_emulated_0_Android_data_com.miui.gallery_cache_SecurityShare_1719372070802.jpg
1719165110660.jpg

WHOOOOO !!

The Digital Pet Dog project is completed! Now you can place it on the car dashboard as an interactive decoration, or give it to your child—they'll know what to do with it 😉.