My Naturewatch Camera Part 2: The Resources Are Not What They Seem
As a recap, this is Not Great. What’s supposed to happen is that the Raspberry Pi + Camera assembly connects via wi-fi to the computer and a little preview shows up on this screen. From there, you can adjust the camera settings and, after building the housing, figure out where you to point the thing for maximum bird content.
Unfortunately, this error did not show up as a possible issue in the instructions, and only one post on the Mynaturewatch forum mentioned the issue — posted over a month ago with no replies. Guess I’m on my own!
The Deleting Stuff Approach
The only other time I’d seen an error like this was when my hard drive was nearing full and some websites wouldn’t load, and instead I would get an error on Safari and sometimes Chrome that said “Not enough resources (maybe memory, idk) to load page.” This was fixed by going on a recycling bin rampage, so I thought maybe the camera software I’d downloaded was to blame?
This didn’t really make sense at the time and it doesn’t make sense now, but in the spirit of sharing I’m including it. I just checked, and the zip file for the software, while hefty at just less than 1 GB, was certainly not going to fill up my hard drive.
The Stack Exchange Approach
Time to do the thing every kid does who fixes computer stuff for their parents and sometimes their bosses — Google it! I have a bit of a love/hate relationship with Stack Exchange because I am terrified of posting something dumb and getting yelled at (what must it be like to have the confidence of an undergraduate sophomore engineering bro), but I do enjoy skulking about.
This time around, I learned that this error did, in fact, seem to stem from the camera and it often happened when too many things were trying to access the camera at once. I figured out how to poke around in the boot/config file to change some settings, hoping that maybe I could just shut off something. I managed to shut off the camera, resulting in a new error message (it was exciting to see something change on the screen), saying that the camera couldn’t be accessed. At least I had confirmation I had plugged the camera cables in correctly, something I already kinda knew, but nice to have a second opinion. Nothing else I did seemed to make a discernible difference, so I restored the original settings.
The “Ok, but I still think there’s too much happening somewhere” Approach
The Module 3 camera is a new model, featuring autofocus, 12 MP HD still photos and video, and, in my case, a 120 degree wide angle lens, since I figured more camera real estate = more birds. Compared to the recommended Pi Zero camera, it occured to me that this camera might require a lot more memory than it was alloted in the original code. I couldn’t find the exact amount of memory it required, but I assumed it would be more than what was alloted in the config file.
The Pi Zero W comes with 512 MB of RAM, and it was easy to change the amount allocated to the camera through the config file.
The original amount is 128 MB, so I stepped it up a few times until I maxed out at 512, at which point I couldn’t even find the wifi network, presumably because it didn’t have enough RAM to run it. The “out of resources” error did not budge.
The “the photos are just too big” approach
Perhaps the size of the photos was to blame? Maybe if I could change the resolution, I would remove some of the burden of this fancy camera. For this, I figured I needed to both learn more about the default setting of the Camera Module 3 and poke around in the Mynaturewatch code.
The code lives on the GitHub page where you download the software package. Is this a very easy place to find it? Yes. Did it take me 20 minutes of being very annoyed to find it? Also yes. I ended up Googling “mynature waxtch cemera source code github” just to end up on a page that I already had open in another tab.
I also more closely checked out the specs of the Camera Module 3 and realized something I hadn’t noticed before — it was running the new picamera2 library and wasn’t compatible with the older picamera. I opened the sourcecode and confirmed what I suspected — the software was written in picamera. HMMMM.
Was this the issue all along? Back to pishop.us for the Pi Zero Mini Camera that, yes, was the one that was suggested for the project initially.
What I’m doing in the meantime:
- Watching The Ultimatum: Queer Love on Netflix (no spoilers, we’re only on ep. 6). This show is a mess, but Tiff’s friend Natasha is an absolute icon and a gift to us all.