G+_Jim Hofmann Posted April 29, 2017 Share Posted April 29, 2017 My sprinkler controller took a hit a couple years ago. I could buy another but what fun is that. I wired in override switches for manual control but it’s time to put back automation. Or so I’ve been told. The existing controller was a 4-zone controller but I only used 2. I also have a pool pump not too far away that really doesn’t need to run 24/7. So, I could use an Arduino, hard code all the scheduling stuff and if I want to change it D/L again. Fairly easy. But what fun is that? So, I thought it would be more of a challenge to be able to change it on the fly. I was going to do the config through BLE or WiFi. However, the more I thought about it, I decided a local control panel would be the fastest way to get working. Wireless could be added after the fact. So now my plan is to use an Arduino but the RPi would be easier to implement the wireless stuff. I still need to figure out how to store values permanently. On the RPi it shouldn’t be an issue but on the Arduino, I haven’t seen it done. Guess I need to figure this out first, it may decide the platform I’m using. I think I’ll post this stuff on my Github page. I’ll keep you posted. Finally, my background is Building Automation Systems Engineer, retired! BAS for big buildings and campuses. I could “borrow” a controller from my old job … but what fun is that? ? As always, any input would be welcome. Link to comment Share on other sites More sharing options...
G+_Jason Perry Posted April 30, 2017 Share Posted April 30, 2017 Look at the Arduino episodes done on KH recently the counter project shows you how to store values. If you follow the link look at the author and view his other projects you might find a sprinkler project that you can borrow from. plus.google.com - Jason Perry - Google+ Link to comment Share on other sites More sharing options...
G+_David Wiggins Posted April 30, 2017 Share Posted April 30, 2017 Also, episode 245 had Aaron Newcomb work a sprinkler automation project he did. I don't remember if he made the code available, I seem to think he posted it on GitHub. . . Maybe? Link to comment Share on other sites More sharing options...
G+_Jim Hofmann Posted April 30, 2017 Author Share Posted April 30, 2017 I found the info at https://www.arduino.cc/en/Reference/EEPROM, the EEPROM Library. I know arduino is for beginners but I really think they should have, maybe, a deep dive. There are multiple store/retrieve methods, write/read, put/get, & update. I had to really dig to understand WTH was up. put/get usually implies primitives. I also knew EEPROM could only be written to so many times (100k), so maybe this was it. Why write v. put v. update? So after reading all 3, several times, I "assUme" write will store any type without checking, put will store any type but checks the value to see if it is the same and needs to be stored using update. And update only stores a byte value if it's different then what is there but, again, appears to be byte oriented. SO, put/get seems to be the methods to use safely with eeprom. In any case, the programmer must track the memory locations and usage. In this case, it should be simple to maintain HH, MM, DOW, RT ... all byte types. Thanks. arduino.cc - Arduino - EEPROM Link to comment Share on other sites More sharing options...
G+_Jim Hofmann Posted April 30, 2017 Author Share Posted April 30, 2017 Just noticed, write, as well, update store primitive byte types. While put will do user defined types. Clear as mud. Link to comment Share on other sites More sharing options...
Recommended Posts