Morning All
I have some code in which I have declared a structure.
I want to pass a pointer to 1 of these structures to a function called 'DoDrip'.
As soon as I put the argument list into the function def I get a comp error:
'drip_struct_error:-1: error: variable or field 'DoDrip' declared void'
A cut down section of the code that shows the issue is below.
I'd be very greatfull if someone would tell me whats wrong please.
Many thanks for your time.
Phil
int ValvePin = 3;
 struct drip_struct{
  boolean active;
  int drip_delay;
  int drip_form_time;
  boolean GoNow;
  long int WaitUntil;
 } drip_1 = {1,0,30,0,0},
  drip_2 = {0,85,30,0,0},
  drip_3 = {0,85,30,0,0},
  drip_4 = {0,85,30,0,0};
 Â
  drip_struct* DripArray[] = {&drip_1,&drip_2,&drip_3,&drip_4};
void setup()
{
Â
}
 Â
void DoDrip(drip_struct* drip_ptr)
{
  digitalWrite(ValvePin, HIGH);
//Â delay(drip->drip_form_time);
  digitalWrite(ValvePin, LOW);
}
void loop()
{
Â
Â
}