So, I started out the night trying to figure out how to install DateTime into the Arduino library and then into my Teensy. What this really means is that there’s some special programing that someone else went to the trouble to write which I could concievable use to keep track of time on the Teensy without having to have it hooked up to a computer all the time and then run the program at set times. For my purpose, that would mean that the Teensy would keep track of the time and know to turn on the servo at the times I specify to feed the kitties.
I think I got the library installed alright, but there’s supposed to be a special place to save the example file so I could load it into the Teensy to see if it worked … and I couldn’t figure it out! I’m still not sure where my “sketch library” is … I have learned that “sketches” are what they call the programs that go into these microcontrollers (like the Teensy) – that took me a few minutes.
While I was looking for where my sketch library is, I saw some people advocated using a separate device called a RTD (real time display) – which really means: a clock – that you wire to your micro controller. Since that was a bit beyond me, I was getting frustrated.
But while I was getting gritty eyed trying to understand all this my brain was working at it from an old angle. “Are you sure an appliance timer wouldn’t be easier?” it asked.
“Well, yeah it would,” I responded with some asperity, “but I still don’t know how I’d get the servo to turn only once in a 15 minute span of being turned on… even 1 minute is too long!” Here I imagined to my brain Malley scarfing up a huge mound of food that is pouring from the continually turning dispenser.
And, not in words, but in motions and streams of jibberish programming my brain showed me how to change the angle and delay times in the servo sketch so it only ran once!! Wow! I love it when my brain works better than I do! Which means, in the program that someone else already wrote that I used to successfully run the servo off the Teensy, I can change some of the numbers so it turns a certain number of degrees and then waits for a long time before moving back to the original place. “DUDE, brain! That should be easy!”
So, I’ve been playing with the delay times, with not a whole bunch of success, but I’m learning stuff none-the-less. The original sketch says to turn the dohicky 180 degrees and then wait for 15ms before turning it back. NO, wait! It doesn’t, really! And I know this because when I changed the delay time to 60000 ms, I thought it wasn’t turning. What I wanted it to do, was turn 180 degrees and then wait a minute before turning back. But instead, it didn’t turn and was making clicking sounds which my brain, I guess I should say Brain cause it’s so awesome and seemingly separate from my brain, just realized was the servo turning one degree every minute! I think!! ?? Wa? Tomorrow I will do more experimenting with the variables…
But now it’s time for bed, so I have to stop… Golly, I make a great team!