{"id":496,"date":"2019-07-15T12:00:41","date_gmt":"2019-07-15T19:00:41","guid":{"rendered":"http:\/\/letsbuildroboticswithshadow8472.com\/?p=496"},"modified":"2019-07-15T19:50:08","modified_gmt":"2019-07-16T02:50:08","slug":"programming-a-pi-to-deter-cats-part-8","status":"publish","type":"post","link":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2019\/07\/15\/programming-a-pi-to-deter-cats-part-8\/","title":{"rendered":"Programming a Pi to Deter Cats: Part 8"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am droning on with my Raspberry Pi Cat Camera project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any sufficiently unguarded water cup is indistinguishable from a cat bowl. I had the unfortunate experience of going through that today. I gave it to the dogs. A completed sentry would not have helped in this case, but it serves as a little reminder. Of course, as soon as I get this thing working, I&#8217;d say its expected life expectancy is about a week or two. However long it takes before my cat stops the unwanted behavior.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I had a little bit of a tangent this week. It turns out it is very easy to get distracted when you have a special effects setup. The background I had last week, a constantly updating weighted average, was very entertaining in its own right. I could jump in front of the camera and fade in as if I were a ghost. I jump away, and my image fades out. If I held still, the picture would get sharper.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I ended up researching how to VNC into my Pi from my desktop so I don&#8217;t have to keep switching out the HDMI cord plugged into the back of my main monitor. It has actually been fairly uneventful so far. My password manager takes a while to register a new password, so I paused work on that angle of the project before I could set up a virtual desktop. The reason I want that is because the Pi checks if it is &#8220;headless&#8221; or without any video outputs when it boots. If there aren&#8217;t any, it goes into minimum resolution mode, presumably to conserve on CPU power. I have sense been careful to plug it in only after a monitor is connected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I also went to the workshop again this week and promptly learned why I should always clean up after experiments; I had tried commenting out the line to convert to grayscale, and forgot to correct it. I also learned that the differing lighting conditions defeated the semi-fine tuned settings I had for my rudimentary motion spotter, and the ghost trails were back. We also did a big one on the old code while trying to simplify the code. One major change later, and I find things going half nuclear. I was given homework: Git Hub and code cleanup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And by code cleanup, I mean extract the bits of code still in use after this great restructure and make it work again. I just need to be sure to chmod my new file. I&#8217;ll also be using native cv2 functions for finding the background and whatnot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By next week, I hope to be able to remote into my Pi with full screen resolution, and get back to where I was but with native cv2 functions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Final Question: How long will it take before the cat learns, and will I ever need to redeploy?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am droning on with my Raspberry Pi Cat Camera project. Any sufficiently unguarded water cup is indistinguishable from a cat bowl. I had the unfortunate experience of going through that today. I gave it to the dogs. A completed sentry would not have &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2019\/07\/15\/programming-a-pi-to-deter-cats-part-8\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Programming a Pi to Deter Cats: Part 8&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[14,9],"tags":[],"class_list":["post-496","post","type-post","status-publish","format-standard","hentry","category-networking","category-programming"],"_links":{"self":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/comments?post=496"}],"version-history":[{"count":2,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"predecessor-version":[{"id":498,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/496\/revisions\/498"}],"wp:attachment":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}