Storing variables at specific time intervals and retreiving them on the same time the next day.
eagletalontim
Posts: 1,399
in Propeller 1
This may sound a bit confusing, but I have my solar panel array tracking the sun using the Prop. Everything works great, but I want to add an extra feature that will save positions from a good sunny day at specific times and if it is cloudy the next day, the data will be pulled from whatever was saved at that specific time the last time it was sunny and the panels will track to the best position. It's kind of hard to track the sun on a cloudy day.....
What I was thinking was use an array for the East and West path, and another array for the Up and Down path. I have the Prop communicating with my web server in 30 second intervals or so requesting for the updated time in the format of (H = 22, M = 15, S = 35) which would be 10:15pm and 35 seconds. I was hoping to save a 24 hour path that the panels can follow if it is cloudy or partly cloudy. I figure 10 minute increments would be good for this. So basically, there will be 6 slots per hour and over 24 hours, there will be 144 possible variables for each path. The problem I am having besides a huge brain fart is how to convert any time of the day to equal the correct array index (0 through 144).
What I was thinking was use an array for the East and West path, and another array for the Up and Down path. I have the Prop communicating with my web server in 30 second intervals or so requesting for the updated time in the format of (H = 22, M = 15, S = 35) which would be 10:15pm and 35 seconds. I was hoping to save a 24 hour path that the panels can follow if it is cloudy or partly cloudy. I figure 10 minute increments would be good for this. So basically, there will be 6 slots per hour and over 24 hours, there will be 144 possible variables for each path. The problem I am having besides a huge brain fart is how to convert any time of the day to equal the correct array index (0 through 144).
Comments