OpenSprinkler › Forums › Comments, Suggestions, Requests › Suggestion on adding a moisture sensor to system › Reply To: Suggestion on adding a moisture sensor to system
Ray
@BratNZ: sure, the sensor pins are digital pins so obviously they can only read digital signals (on or off). ESP8266 unfortunately only has one analog pin and that’s already used for reading solenoid current. For that reason the sensors are assumed “switch” sensors, and not analog sensors.
Flow sensors are also switch sensors basically, though they click at much more rapid pace compared to rain or soil sensors.
“What’s the memory usage and cycle time of the current OpenSprinkler code?”
– At resting state, OS 3 has about 27 to 30KB RAM available. There is also plenty of flash memory space, so you can expand the firmware quite a bit. About ‘what’s the cycle time’ — I don’t know what you mean by cycle time. If you are really worried about RAM and flash memory space, you can use OSPi, which is based on Linux.
“How many digital I/O ports on the microcontroller are free?”
– On OS 3, none, because all GPIO pins are used. However, you can expand GPIO using IO expander — that’s also how OpenSprinkler expanders work, they use PCA9555 I/O expanders on I2C line.
Again, I think if you have complicated processing need, you should consider using OSPi, which has pretty much unlimited processing power and storage.