WoofWhimsy - a Digital Pet Dog
by vishalsoniindia in Circuits > Robots
1014 Views, 7 Favorites, 0 Comments
WoofWhimsy - a Digital Pet Dog
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.
buy me a coffee! ☕: Paypal
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
This is a simple project that doesn't require many supplies.
- Unihiker Board (amazon.com / amazon.in / dfrobots )
- Type C cable (amazon.com / amazon.in / dfrobots )
- Unihiker board case (amazon.com / amazon.in / dfrobots )
- A 3D print Stand for UNIHIKER
- A laptop for Programming
Features of the Pet
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
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
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
Setting up UNIHIKER is straightforward, using a Jupyter Notebook for programming in this project. Follow these steps below to enable Jupyter programming.
- Connect the UNIHIKER device to your PC.
- Wait for it to boot up and the home screen to appear.
- Press the HOME button to bring up the menu.
- Navigate to the Service Toggle option using the up and down buttons.
- 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
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:
- Click on "File Upload".
- Enter the folder name "dog_faces". Be careful with the name, as incorrect naming may cause the code to crash.
- 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
Now it's time to upload the Python script to the board.
- Stay on the File Upload section.
- Remove the "dog_faces" folder name so that the folder name field is empty.
- 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
By default, the code won't run at startup. You need to enable auto boot.
- Power the UNIHIKER with a Type-C cable.
- Press the HOME button to enter the menu.
- Find and open the Service Toggle in the menu.
- 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.
- Find "Run Programs" in the menu and open it.
- Here, navigate to the /root/ directory where all the files were uploaded.
- 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
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
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 😉.
buy me a coffee! ☕: Paypal