Slowly understanding my own project requirements.

One way automatable #video #streaming directly to browser without cloud or at least with #privacy options. Some kind of "action control" going the other way. A nice stretch goal is two-way video.

Think #security #camera with two-way chat and remote "zap the intruder" button.

#Twitch does the key parts, but has no privacy options. #Discord video chat doesn't seem automatable. Rolling my own would be a hassle. Other options? #catvideofeed

Maybe #DIY wouldn't be so hard. VPN to homenet. Then access page based on

https://www.youtube.com/watch?v=zfBHD4v8hD0
https://github.com/EbenKouao/pi-camera-stream-flask
https://github.com/EbenKouao/pi-camera-stream-flask

Not thrilled with #raspberrypi nitwits these days, but I already own a bunch and can just get other SBCs. Already have IP cameras. I've done flask....it's all right there. #catvideofeed

How To Make A Remote Viewable Camera With Raspberry Pi (Beginner Project)

YouTube

Aha, I think I found what Eben based his code on

https://blog.miguelgrinberg.com/post/video-streaming-with-flask

with a followup at

https://blog.miguelgrinberg.com/post/flask-video-streaming-revisited

It's not really #video #streaming, it's just a bunch of audio-free images delivered individually. But it's the clearest and simplest I've found so far. And more importantly, makes it pretty easy to integrate in the button commands going the other way.

#python #flask #catvideofeed

Video Streaming with Flask

I'm sure by now you know that I have released a book and a couple of videos on Flask in cooperation with O'Reilly Media. While the coverage of the Flask framework in these is fairly complete, there…

Got the #streaming #video part of this working in like an hour. Nice. The original simple version isn't as bad as the followup implies. Like, there's no limit to one client. (Guessing #Flask started including multiple server threads, but I haven't looked into it.)

I spent hours fumbling with stupid #CSS to make a navbar overlay, but I. Hate. #GUI. #Programming.

Eventually I just img.onclick()'d the video itself to an endpoint. Next stage is using click to do something on a #SBC. #catvideofeed

Next stage was actually to get an SBC set up and hooked up with a usb cam (waaayyy easier than an IP can for wiring reasons).

THEN I got the img.onclick() tied all the way back to a breadboard LED, which I can toggle with my finger on my phone.

If cats ate photons, I'd be done now!

#catvideofeed

Easily in the top 10 of stepper motor videos I've watched all evening: https://www.youtube.com/watch?v=B86nqDRskVU

I went from "why tf does this thing not work at all like I'd expect" to "well obviously the torque is twice as strong when doing fullstep vs wave control signals".

(The braindead rpi pin numbering system wasn't doing me any favors either.)

Now to just spend a happy evening or two writing a driver for it to power the Cat Feeder project. I know they probably exist already! I don't care!
#catvideofeed

28BYJ-48 Stepper Motor and ULN2003 Driver Intro

YouTube

Not even much of one evening writing the driver. It just needs to be able to step +/-N and I got that pretty nailed even accounting for three stepping modes.

Hooked it up with the #flask app without any trouble.

Now when I click the video in the browser I see the #LED blink *and* the #motor turn. #Softwareengineering is essentially solved.

Tomorrow, the #mechanicalengineering (I hope).

#catvideofeed

#EngineeringMarvels #MechanicalWizardry #BuiltToLast

Started putting this together, but now I have to impatiently wait to get into the room where we store the hot glue gun.

(first spelled that "hot clue gun"--could use one of those as well.)

#catvideofeed

The drawing is now a reality! A failure, but a reality!

1. Drive system is too loose. Needs positive engagement with the motor and some bearings to reduce friction. Near the hairy edge of stalling.

2. Allowing kibbies to simply fall out isn't going to work without an agitator. The hole is too big already and they are stuck. I might want a screw feed mechanism instead.

3. It needs to be impossible for the kibbies to fall into the gear train, as they nearly did here.

#engineering #catvideofeed

I thought I could get away with the above simplistic design. Now I'm going to try the real mechanisms people have come up with for dispensing small portions. still build it myself, tho, because I love a challenge.

Instead of #adhd-waiting for the 25th, I'm going to "engage my large muscle groups" Take 2

#catvideofeed

So....two days of dicking around with that idea taught me a lot about how candy dispensers work, but didn't solve my #catvideofeed problem.

Any design that has any kind of sliding door element that can stall the motor is doomed, because a kibbie can jam it. There are ways to solve this (take a look inside a candy dispenser to learn one way), but I'm not willing to put in the effort/complexity to do that.

The next idea is to go back to the previous idea: A rotating barrel.

Addressing the issues of the previous barrel iteration

0. Rotation: Put an axle through the barrel and fill through a side hatch.

1. Portioning: An internal baffle that puts the kibbies through a maze

2. Jamming: Fixed stirrer arms on the axle to dislodge them

Wish me luck, by god. #catvideofeed

Having a lot of problems with my laziness-imposed constraint of cardboard #engineering. (I have a wood/#machineshop in the barn, but do I use it? Do I hell.)

After hacking a bunch of #Lego gears/connectors to fail to get the stepper turning the barrel, I wanted to build the structure out of Lego as well. Stepper now a problem.

You have Lego motors, nitwit!

Happen to have #HBridge ICs in stock, so threw together a #circuit to drive it from the SBC. Works! Now write a driver.

#catvideofeed

Well damn. #LEGO is a little more effective than cardboard for building machines.

It isn't pouring yet and the structure needs some reinforcement, but this is going a lot better than it was.

#catvideofeed

Motivated to get this project to a stage where it doesn't have to be on my workbench--I want the #oscilloscope for the #fpga (#adhd)

End-to-end test. Video fed live to browser. Click on the #video to start the feeder rotating, which dispenses some kibbies while Big Brother watches

Next step is to put this elsewhere, which requires power solution (probs wall wart). Then test the heck out of it to find the weak points. (Gonna guess the top struts and kibbie hatch.)

#LEGO #catvideofeed

Put this aside for a week while I screwed around with other things. Today 5V #wallwart and #breadboard DC barrel jack came

Not sure I dare power the #SBC from the wart (polarity if I ever swap the wart), but can use separate USB there

Plugged the wart + barrel -> VOM to check which pin was what. Yep, 5V. Unplugged....1.5V for many minutes

How large are the caps inside these things? If I unplug it and toss in a bin, is there any chance of a short causing a fire...OR WORSE?

#catvideofeed

Wiring up a custom #sbc motor controller hat to power the #catvideofeed. I could use a #breadboard and terminal block, but let's be professional.

That said, the next photo will undoubtedly be of this in the trash because I suck at planning (#adhd) and will surely get this very wrong.

As if to confirm, after I took this photo I had the good idea to #solder some little "flags" near the first pins on things to keep me oriented. I put one of them *on the wrong side of the board*.

One of the cats understands the concept after a couple iterations, the other one may never get it.

(The smart one is also trying to kill the goose that lays the golden eggs.)

#catvideofeed #lego #electronics