OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Sourcing web pages from the PI

This topic contains 1 reply, has 0 voices, and was last updated by  mrburns42 6 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22370

    mrburns42
    Member

    First let me say that I think OpenSprinkler is a great project. What I am about to say should not be taken as criticism. For the target of running a web based sprinkler control without any additional required computer support, it is superb.

    However, the OpenSprinkler project has run out of code space, and this is a major headache for the hobbyist. When an OpenSprinkler board is teamed up with a Raspberry Pi, it seems that the workload could be shifted to the device most suited for the job. In my case, the OpenSprinkler board will be housed in my crawlspace because that is where is sprinkler cable are located. The OpenSprinkler will communicate via WiFi back to the Pi and the rest of the network. Therefore, the OpenSprinkler does not need full web page support, it only needs to talk to the Pi which would host all the web stuff. That would allow code space to be freed up in the OpenSprinkler to support other devices, like temperature and humidity sensors, etc.

    Now my questions:

    1. What exactly is the largest consumer of Flash ROM on the OpenSprinkler? Is it text strings or other non code data? If so, could this stuff be moved to an external EEPROM to save Flash ROM for executable code?

    2. Is there a clean division of cpp files that contain the web pages which could be ported to the Pi and free up code space in the OpenSprinkler?

    3. Has anyone started something like this that I could use as a code base?

    Thanks.


    Steve

    #23413

    Ray
    Keymaster

    Steve,

    If you haven’t noticed it, you should check the OpenSprinkler Pi project: http://pi.opensprinkler.com. This may be what you are looking for.

    Regarding your questions:
    – The flash is mainly consumed by program code, scheduling algorithms, and a small amount of the Javascript code for serving webpages. The bulk of the Javascript has been moved to external files stored on rayshobby.net server (otherwise there is no way to fit everything in 32KB of flash memory space). The EEPROM is mainly consumed by program settings, program data, and controller settings.
    – Server related functions are all in server.pde (pde is the Arduino extension, it is really a cpp file)

    #23414

    mrburns42
    Member

    I saw the OpenSprinkler Pi project. It is a nice addition to the Raspberry PI. However, it will not really work for me. I need to locate the controller in a crawlspace. That is not the kind of environment that a Raspberry PI will thrive in. Also, I do not want to have to crawl in there to reboot Linux if the Pi has a problem.

    I did a disassembly of the code. The text strings seem to consume about 3K. This is not a large area, but would be some savings. I also started removing the LCD stuff, as it is not needed for an OpenSprinkler mounted where I cannot see it. This has got me about 1.5K of Flash so far.

    Eventually, if the user has a PI, then the original OpenSprinkler firmware could be downsized to just an Ethernet based controller that updates the shift register controlling the triacs on demand. This would free up a good chunk of code space in the AVR for a user area. It would also be compatible the the OpenSprinkler Pi project, as it would just use a different driver to communicate with the shift registers.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Sourcing web pages from the PI