If they're worrying about feeding the dog, I hope they're worrying a little more about making she gets outside to do her business :) Also, my three GSDs are VERY good at reminding me that I haven't fed them. Often they'll remind me even if I >have< fed them...
Zack, have you entertained the idea of making several of these and making them available for purchase on your merch site? Just a thought! Regardless, I will let my friends at the dog park know about this idea and see if I can send some business your way, if you want it…. Great idea and video!
I have considered it, but the BOM cost is a little high. I have some ideas to make it a little more affordable. Whoever buys it would probably need to be a maker. This isn't really ready to be a general consumer product
You're hitting an NTP server every loop? That ain't cool. I'd do a polling mechanism. Have it get the initial NTP request, count to some arbitrary large-ish number, get another NTP request, see how many seconds (Maybe even msec depending on the resolution provided by the server) have passed, then you know how long to wait (roughly) before hitting the next NTP request. As a network and service admin, I hate it when applications beat the snot out of services like that. Not to mention, since you're using wireless, that's going to chew up a lot of the spectrum. It'd be like "Ok, what time is it now? Ok. Going to count to a million. Done, what time is it now? Took me 10 seconds? Ok. Based on that, I can count to 100,000 each second. From there, if I wait 60,000,000, I can check what time it is and then do the button check. Wait... I'm a little long or short? I can adjust the base number of cycles per second and recheck later or earlier next time."
I'm not sure which NTP library he's using, but it's probably the same one I used in a recent project, and it implements that behavior by default. You call timeclient.update() every loop, but the library only hits up the NTP server once every minute (I think, I don't quite recall the default polling interval).
Easiest way is to set a global variable for each task you do not every time in a loop to millis() which gives you the runtime in milliseconds the microcontroller booted. During the loop you can check if the difference between the stored value and the current value of millis() to be greater than whatever you need. No manual loop calibration needed, which may be optimized to nothing by the compiler by chance if you aren't doing anything during the count with the value. The other option is to use threads which can use a delay function only blocking themselves, but this may require to use mutexes to avoid concurrent access to the same resources and thus may complicate things a lot. I only use it if the main loop introduce timing inconsistencies for some functions that require a fairly fixed interval.
@@drstefankrankIf its a 64-bit integer, then that makes sense. If there's a guard in the NTP library that protects against just slamming the heck out of the NTP server I'm good with that.
@@evanbarnes9984The update interval is 60 seconds by default. That is FAR too often to be bothering an NTP server. These CPUs have stable enough clocks that every 6 hours would be plenty.
Fantastic! This has so many applications. Maybe a version for elderly people to remember to take pills.
My cats already have built in reminders.
I think the "Previous State" function is very smart. Nice!
Cute dog!
Very cool!!!! 😃👍
Oh shoot, this reminded me I haven’t fed my kids today…
If they're worrying about feeding the dog, I hope they're worrying a little more about making she gets outside to do her business :) Also, my three GSDs are VERY good at reminding me that I haven't fed them. Often they'll remind me even if I >have< fed them...
Zack, have you entertained the idea of making several of these and making them available for purchase on your merch site? Just a thought! Regardless, I will let my friends at the dog park know about this idea and see if I can send some business your way, if you want it…. Great idea and video!
I have considered it, but the BOM cost is a little high. I have some ideas to make it a little more affordable. Whoever buys it would probably need to be a maker. This isn't really ready to be a general consumer product
That’s gonna be one fat dog! 🤣
You're hitting an NTP server every loop? That ain't cool. I'd do a polling mechanism. Have it get the initial NTP request, count to some arbitrary large-ish number, get another NTP request, see how many seconds (Maybe even msec depending on the resolution provided by the server) have passed, then you know how long to wait (roughly) before hitting the next NTP request. As a network and service admin, I hate it when applications beat the snot out of services like that. Not to mention, since you're using wireless, that's going to chew up a lot of the spectrum.
It'd be like "Ok, what time is it now? Ok. Going to count to a million. Done, what time is it now? Took me 10 seconds? Ok. Based on that, I can count to 100,000 each second. From there, if I wait 60,000,000, I can check what time it is and then do the button check. Wait... I'm a little long or short? I can adjust the base number of cycles per second and recheck later or earlier next time."
I'm not sure which NTP library he's using, but it's probably the same one I used in a recent project, and it implements that behavior by default. You call timeclient.update() every loop, but the library only hits up the NTP server once every minute (I think, I don't quite recall the default polling interval).
Easiest way is to set a global variable for each task you do not every time in a loop to millis() which gives you the runtime in milliseconds the microcontroller booted. During the loop you can check if the difference between the stored value and the current value of millis() to be greater than whatever you need. No manual loop calibration needed, which may be optimized to nothing by the compiler by chance if you aren't doing anything during the count with the value.
The other option is to use threads which can use a delay function only blocking themselves, but this may require to use mutexes to avoid concurrent access to the same resources and thus may complicate things a lot. I only use it if the main loop introduce timing inconsistencies for some functions that require a fairly fixed interval.
@@drstefankrankIf its a 64-bit integer, then that makes sense. If there's a guard in the NTP library that protects against just slamming the heck out of the NTP server I'm good with that.
@@evanbarnes9984The update interval is 60 seconds by default. That is FAR too often to be bothering an NTP server. These CPUs have stable enough clocks that every 6 hours would be plenty.
Cool project, but dogs don't eat 3 times a day... Their metabolism is much slower than our is and this will cause them to gain a lot of extra weight.
Puppy’s do in fact 4 smaller feeds a day until 4 months old
First!