-
1Features 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.
-
23D 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.
3D files: https://www.tinkercad.com/things/iplEOUQ0n7H-woofwhimsy
-
3About 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 onboar
d 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.
-
4Setting 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.
-
5Uploading 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
-
6Uploading 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.
-
7Run 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.
-
8Testing
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.
-
9Done
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 😉.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.