Programming a Pi to Deter Cats: Part 8

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 helped in this case, but it serves as a little reminder. Of course, as soon as I get this thing working, I’d say its expected life expectancy is about a week or two. However long it takes before my cat stops the unwanted behavior.

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.

I ended up researching how to VNC into my Pi from my desktop so I don’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 “headless” or without any video outputs when it boots. If there aren’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.

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.

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’ll also be using native cv2 functions for finding the background and whatnot.

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.

Final Question: How long will it take before the cat learns, and will I ever need to redeploy?

Leave a Reply