void Solenoid(){ // for (int i=0;i<5;i++) { // Get time value for i // Turn on soldenoid i // Wait the specified time // Check sensor for input // Abort if active // Turn off solenoid i digitalwrite(solenoid_ }}

But I am stumped how to translate the "i" into the command.

I know I have been through this similar thing with printing things on the display with the sprintf(), but don't know if that works with this situation.

BTW, you probably could have chosen a better title, such as 'Potted plant watering system', since 'Pot plant watering system' says to me the growing of marijuana. Even if that is what is in your potted plants, it may have limited the responses.

Concept: Daily or weekly it waters plant pots. Sensors detect if the saucer under the pot is full or not, and stop the pump when it detects the water depth. There is also a "timeout" period per pot incase there is a problem with filling the pot.

// These are the sensors for each pot and the main reserve#define sensor_Main 14#define sensor_1 15#define sensor_2 16#define sensor_3 17#define sensor_4 18#define sensor_5 19

// These are the pins to drive each solenoid for each pot.// They are OR'd together to turn on the motor/pump.int solenoin[5];#define solenoid_1 0#define solenoid_2 1#define solenoid_3 2#define solenoid_4 3#define solenoid_5 4

void Solenoid(){ int i; for (i=0;i<5;i++) { // Get time value for i // Turn on soldenoid i // Wait the specified time // Check sensor for input // Abort if active // Turn off solenoid i digitalWrite(solenoid_[i],HIGH); sensor_delay(i); }}

I can be writing away and it complies. Haven't even got to testing it yet. I do some small changes, and it just falls over in a big heap.

Errors everywhere.

V1.cpp: In function 'void Solenoid()':V1:160: error: 'solenoid_' was not declared in this scopeV1.cpp: In function 'int sensor_delay(int)':V1:182: error: 'sesnor_' was not declared in this scopeV1:187: error: 'solenoid_' was not declared in this scopeV1.cpp: At global scope:V1:195: error: expected unqualified-id before 'return'

I was starting to think along those lines, but had not got around to checking myself on it.

Thanks for the info.

WRT lifting the water and using gravity:Well, nice idea, but it is a LOT of water. Probably 100 Litres or more. That is a lot of weight to eleveate. That means making a support for the container and all that kind of stufff.

Thanks, but for now I am wanting to concentrate on the programming side of things and not have to get too muchh into the mechanical side of building "structures" to support 100KG of water above a certain height.

// Array for each pot's fill timeint sol_run_time[5];// Array for the values for the system to look for to indicate "full"int level[6];// Solenoid arrayint solenoid[5];// Sensor arrayint sensor[6];

// These are the sensors for each pot and the main reserve#define sensor[0] 14#define sensor[1] 15#define sensor[2] 16#define sensor[3] 17#define sensor[4] 18#define sensor[5] 19

// These are the pins to drive each solenoid for each pot.// They are OR'd together to turn on the motor/pump.//int solenoid[5];#define solenoid[1] 0#define solenoid[2] 1#define solenoid[3] 2#define solenoid[4] 3#define solenoid[5] 4

Concept: Daily or weekly it waters plant pots. Sensors detect if the saucer under the pot is full or not, and stop the pump when it detects the water depth. There is also a "timeout" period per pot incase there is a problem with filling the pot.

// Array for each pot's fill timeint sol_run_time[5];// Array for the values for the system to look for to indicate "full"int level[6];// Solenoid arrayint solenoid[5];// Sensor arrayint sensor[6];

// These are the sensors for each pot and the main reserve#define sensorPins[0] 14#define sensorPins[1] 15#define sensorPins[2] 16#define sensorPins[3] 17#define sensorPins[4] 18#define sensorPins[5] 19

// These are the pins to drive each solenoid for each pot.// They are OR'd together to turn on the motor/pump.//int solenoid[5];#define solenoidPins[1] 0#define solenoidPins[2] 1#define solenoidPins[3] 2#define solenoidPins[4] 3#define solenoidPins[5] 4

void Solenoid(){ int i; for (i=0;i<5;i++) { // Get time value for i // Turn on soldenoid i // Wait the specified time // Check sensor for input // Abort if active // Turn off solenoid i digitalWrite(solenoid[i],HIGH); sensor_delay(i); }}