<< return to Vizycam.com

User Tools

Site Tools


wiki:pet_companion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
wiki:pet_companion [2020/09/26 15:13]
vizycam [Using the App Console]
wiki:pet_companion [2021/10/17 12:27]
vizycam
Line 2: Line 2:
 ====== Pet Companion tutorial ====== ====== Pet Companion tutorial ======
  
 +**Note, this page is using an older version of Vizy's software. ​ We will update this page to reflect Vizy's latest software in the coming weeks. Refer to our [[https://​docs.google.com/​spreadsheets/​d/​1UnN9SyLganIXv5jGsvLAsqacvitxkMzRXpjzAuxa1Ig/​edit#​gid=0|schedule]] for more information.**
  
-{{wiki:​bonzer4.mp4||loop,​autoplay}}+{{wiki:​bonzer4.mp4|670x10|loop,​autoplay}}
  
  
Line 27: Line 28:
  - Google account  - Google account
  - Powered speakers (optional)  - Powered speakers (optional)
- - Materials for making treat dispenser ​FIXME: link (optional)+ - Materials for making ​[[wiki:​make_treat_dispenser|treat dispenser]]
  - Familiarity with Python  - Familiarity with Python
  
Line 46: Line 47:
  
  
-Vizy runs a full Linux (Raspberry Pi OS) including file system (files, directories,​ and such), and we need to access the file system to add and edit some files. ​ This can be done by accessing a "​network share volume"​ on Vizy, or you can access the file system using and browser and Vizy's built-in text editor. ​  +Vizy runs a full Linux (Raspberry Pi OS) including file system (files, directories,​ and such), and we need to access the file system to add and edit some files. ​ This can be done by accessing a "​network share volume"​ on Vizy, or you can access the file system using and browser and Vizy'​s ​[[wiki:​vizy_editor|built-in text editor]].   
  
  
Line 66: Line 67:
 === Strictly through browser === === Strictly through browser ===
  
-If you don't want to bother with opening a network share volume on Vizy, you can use Vizy's built-in text editor ​FIXME!.  Vizy's editor is reasonably sophisticated and allows you to create as well as edit files on Vizy.  ​+If you don't want to bother with opening a network share volume on Vizy, you can use Vizy'​s ​[[wiki:​vizy_editor|built-in text editor]].  Vizy's editor is reasonably sophisticated and allows you to create as well as edit files on Vizy.  ​
  
  
 ==== Creating the new directory and new source file ==== ==== Creating the new directory and new source file ====
  
-Once you have access to the views directory, create a new directory called ''​pet\_companion''​ inside the ''​view''​ directory. ​ This is where all of our application'​s code and resources will live.  And from within ''​pet\_companion'' ​ directory create a new file called ''​pet\_companion.py''​ using your favorite text editor (or Vizy's built-in text editor.) ​ Inside the file copy the text:+Once you have access to the views directory, create a new directory called ''​pet\_companion''​ inside the ''​view''​ directory. ​ This is where all of our application'​s code and resources will live.  And from within ''​pet\_companion'' ​ directory create a new file called ''​pet\_companion.py''​ using your favorite text editor (or Vizy'​s ​[[wiki:​vizy_editor|built-in text editor]].)  Inside the file copy the text:
  
 <sxh python; highlight: [14, 24, 26, 4, 22]; title: pet_companion.py,​ creating our Pet Companion view:> <sxh python; highlight: [14, 24, 26, 4, 22]; title: pet_companion.py,​ creating our Pet Companion view:>
Line 124: Line 125:
  
  
-{{wiki:​pet_companion_vid_770.mp4||loop,​autoplay}}+{{wiki:​pet_companion_vid_770.mp4|770x10|loop,​autoplay}}
  
  
Line 160: Line 161:
  
  
-{{wiki:app_console_800.mp4||loop,​autoplay}} ​+{{wiki:app_console_1000.mp4|1000x420|loop,​autoplay}} ​
  
  
Line 254: Line 255:
  
  
-FIXME! Video of dog being detected+{{wiki:​detect_dog_770.mp4|770x10|loop,​autoplay}} ​
  
  
Line 284: Line 285:
  
  
-FIXMEvideo +{{wiki:text_pet_770.mp4|770x10|loop,​autoplay}}
  
  
Line 402: Line 403:
  
  
-Being able to access Vizy remotely and give your pet a treat would be nice, right? ​ Such a feature requires some kind of treat dispenser. ​ Fortunately,​ making a treat dispenser for your pet isn't too difficult ​FIXME: link.  (And isn't your pet worth it?)+Being able to access Vizy remotely and give your pet a treat would be nice, right? ​ Such a feature requires some kind of treat dispenser. ​ Fortunately, ​[[wiki:​make_treat_dispenser|making a treat dispenser for your pet isn't too difficult]].  (And isn't your pet worth it?)
  
  
-After following the assembly and connection instructions ​FIXME: link, you're ready to add a "​Dispense Treat" button to the code.+After following the [[wiki:​make_treat_dispenser|assembly and connection instructions]], you're ready to add a "​Dispense Treat" button to the code.
  
 <sxh python; highlight: [5-7, 11-15, 20-21, 25-28]; title: Adding a treat dispenser button:> <sxh python; highlight: [5-7, 11-15, 20-21, 25-28]; title: Adding a treat dispenser button:>
Line 460: Line 461:
 This code registers a callback with the text media object, so that when you text the word "​treat"​ to your Vizy camera, treats are dispensed, pets are made happy, and you get an "​ok"​ confirmation. ​ This code registers a callback with the text media object, so that when you text the word "​treat"​ to your Vizy camera, treats are dispensed, pets are made happy, and you get an "​ok"​ confirmation. ​
  
-FIXME: video of treat being typed into phone and treat being dispensed 
  
  
Line 479: Line 479:
  
  
-FIXME! Picture of config+ 
 +{{wiki:​vizy_sharing2_770.mp4|770x10|loop,​autoplay}}
  
  
Line 503: Line 504:
  
 And, of course, your pet thanks you! And, of course, your pet thanks you!
- 
- 
-Here's the complete source code: FIXME! 
- 
- 
- 
- 
- 
- 
- 
- 
- 
-  ​ 
  
wiki/pet_companion.txt · Last modified: 2023/04/12 16:41 by vizycam