convert int to char, concatenate and merge back problem

I'm having a bit of difficulties with what should be a simple process, I think anyway, of converting integers to chars or strings, concatenating them, and then turning it back to an integer.

clockHour, clockMinute, and timer are global variables

void flowerCycle() {


  char cycleLight[5] ;
  int cycleInt =0;
  char var1[3] ={clockHour};
  char var2[3] = {clockMinute};
  char var3[3] = {timer};
  cycleLight = String.concat(var1 + var2 + var3);
  cycleInt = cycleLight.toInt();
 
  switch (cycleInt) {
    case 00:
      digitalWrite(lightGrowBlue, HIGH);
      digitalWrite(lightGrowRed, HIGH);
      Serial.print("Grow Lights are on. Flowering Cycle"), Serial.println("");
      break;
    case 170:
      digitalWrite(lightGrowBlue, LOW);
      digitalWrite(lightGrowRed, LOW);
      Serial.print("Grow lights are off. Flowering Cycle"), Serial.println("");
      break;
  }
}

Here is an incomplete snippet of my answer: it's because.

"expected primary-expression before '.' token" and invalid operands of types 'char [3]' and 'char [3]' to binary 'operator+' Arduino are the errors i've been getting. i think i've resolved the second error, but i'm not sure where the '.' are supposed to go here

Here's another snippet of my answer: I can't see your

it would be infinitely more helpful if you would just tell me what it is that you think i'm missing here...

Post all of the code. The problem is often in the code that you don't post.

Post the entire text of the error message(s). Posting the errors is easy. Use the copy error meaasges button and paste into the forum in code tags.

char var1[3] ={clockHour};

Hints not broad enough, huh?

It's not what you're missing, it's what we're missing.

Code.
All of it so that we can see what type the variables are.

Error messages. All of them. The IDE makes this simple.

It would be infinitely more helpful if you'd read the clearly-posted threads telling you how to get the most out of the forum, that people have taken the time and effort to write.

making vague hints at something takes time to process and is incredibly frustrating and time consuming to figure out..

/*
  This module runs all physical electronic outputs.
  -Pump cylces on every 2 minutes for 30 seconds before shutdown
  connected to Digital Pin 0
  -LED lights will remain on for a period full 24 hours for
  the vegitative phase connected to Digital Pin 3 and 4
  -LED lights will need to transition to a X hour day/night
  cycle and enable additional blue LED strips connected to
  Digital Pin 5

*/
//counter variables 
int timer = 0;
int clockSecond = 0;
int clockMinute = 0;
int clockHour = 0;
String cycleSelect;
int cycleWeek = 0;
String lightSelect;
int bluelight =0;
int counterCycle = 1; //pump cycle optimizing variable
int lightSwitchOnOff = 0; //used to avoid reswitching.

//Digital pin assignments and initialization
int lightGrowPrimaryRed = 10; //use digital pin 10 for primary red light
int lightGrowBlue = 11;  //use digitial pin 11 for pumping switch
int lightGrowRed = 5;   //use digital pin 4 for grow light swtich. these strings of red lights are only on during the vegitative phase
int lightFlowerBlue = 4;   //use digital pin 5 for blue light switch
int lightPruning = 6; // use digital pin 7 for blue light pruning function

int waterPump = 7;  //use ditital pin 6 for water pump switch

int fanIngress = 8; // use digital pin 8 for ingress fan control
int fanEgress = 9; // use digital pin 9 for egress fan control

const byte switchSLT = 18; //use digital pin 18 to control changing lighting phases from vegitative to flowering and back
const byte switchGrowPhase = 19; // use digital pin 19 to enable/disable Blue Light Pruning aparatis. initial configuration is off
const byte switchFanControl = 20; // use digital pin 20 to enable disable fan control. initial configuration is off
const byte switchMasterPower = 21; //use digital pin 21 to constrol master power on/off for whole system

//Interrupt variable
volatile byte stateFan = 0; //variable to evaluate to enable fans
volatile byte stateGrowPhase = 0; //variable to evaluate which grow phase to put the lighting array in
volatile byte stateSLT = 0; //variable to enable/disable SLT array
volatile byte statePower = 0; // variable control over all electronic functions pointing to a holding function


void setup() {

  Serial.begin(9600);
  Serial.println("--Start Serial Monitor SEND_RCVE --:");
// pinmode setup for 
  pinMode(lightGrowBlue, OUTPUT);
  pinMode (lightGrowRed, OUTPUT);
  pinMode (lightFlowerBlue, OUTPUT);
  pinMode (lightGrowPrimaryRed, OUTPUT);  
  pinMode (waterPump, OUTPUT);
 
  pinMode (fanIngress, OUTPUT);
  pinMode (fanEgress, OUTPUT);
  
  pinMode (switchGrowPhase, INPUT);
  pinMode (switchSLT, INPUT);
  pinMode (switchFanControl, INPUT);
  pinMode (switchMasterPower, INPUT);

    pinMode(lightPruning, OUTPUT);  
    digitalWrite(lightPruning,LOW); //turn SLT array off by default
 
    pinMode(switchSLT, INPUT); 

 //enable interrupts 
 attachInterrupt(digitalPinToInterrupt(switchGrowPhase), growPhase, RISING);
 attachInterrupt(digitalPinToInterrupt(switchSLT), SLTArray, RISING);
 attachInterrupt(digitalPinToInterrupt(switchFanControl), fanControl, RISING);
 attachInterrupt(digitalPinToInterrupt(switchMasterPower), powerControl, RISING);

//enable primary lighting
digitalWrite(lightGrowPrimaryRed, HIGH);
digitalWrite(lightGrowBlue, HIGH);

/*Fans enabled from initiation of code. Version 3 code allows for disabling/enabling the fans. However, 
 * they are not independently controled due to wiring constraints in the hardware
*/
  digitalWrite(fanIngress, HIGH);
  digitalWrite(fanEgress, HIGH);

  Serial.print("--End of initialization--");
}

void loop() {
  /*
     Aeroponics lighting and pump timer code
     clock timer works off miliseconds and converts to second, minutes, hours, days, weeks.
     this information is then used by the functions vegCycle and flowerCycle to count down to
     4 weeks and transition to the flowering cycle, turning the lights off for 6 hours as well
     as enabling additional blue spectrum lighting during the day cycle. The pumpCycle function
     controls switching the pump on every 2 minutes and then delaying for a period of time before
     switching the pump off again and resuming the application.
  */

//check power state variable to disable/enable electronics
switch(statePower){
  case '0':
    powerOff();
    break;
  case '1':
    powerOn();
    break;
}
  timer++;
  if (timer == 20) {   //timer must be changed and tested for accuracy if additional code is added
    clockSecond++;
    timer = 0;
  }
  if (clockSecond == 60) {
    clockMinute++;
    clockSecond = 0;
  }
  if (clockMinute == 60) {
    clockHour++;
    clockMinute = 0;
  }

      Serial.print(clockMinute % 2), Serial.println("");
      Serial.print("clockSecond = " ), Serial.print(clockSecond), Serial.println("");
      Serial.print("ClockMinute = " ), Serial.print(clockMinute), Serial.println("");
       Serial.print("Timer = " ), Serial.print(timer), Serial.println("");

//Select day/night cycle pattern
 switch (stateGrowPhase) {
  case 0:
    vegCycle();
      break;
    case 1:
      flowerCycle();
      break;
  }

  //Call pump function
  pumpCycle();


}

/*all function calls below this point
*/

void growPhase(){
  stateGrowPhase=!stateGrowPhase;
}

void SLTArray(){
  stateSLT=!stateSLT;
}

void fanControl(){
  stateFan=!stateFan;
}

void powerControl(){
  statePower=!statePower;

  
}

void pumpCycle() {
  // Nutrient Pump Cycle Function
  int pumpTime = 0;

  pumpTime = clockMinute % 2 ;
  Serial.print("pumptime variable ="), Serial.print(pumpTime), Serial.println("");

  
 switch (counterCycle){
    case 1:     //evaluate if the pump should be turned on and passed to the next case or leave disabled
      if (pumpTime == 0 && clockSecond == 0) {
        digitalWrite(waterPump, HIGH), Serial.print("Nutrient pump is active"), Serial.println("");
        counterCycle++;
      }  
        break;
      
    case 2:     //determine if pump has been enabled for 30 seconds
      if (pumpTime == 0 && clockSecond ==30) {
        counterCycle++;
      }
        break;
      
    case 3:     //determine if pump has been enabled for 30 seconds and disables the pump. resets counterCycle if the time has elapsed
       if (pumpTime == 0 && clockSecond == 31) {
        digitalWrite(waterPump, LOW), Serial.print("Nutrient pump is inactive"), Serial.println("");
        counterCycle =1;
        }
       break;
       
 }
}

void vegCycle() {
  // This function defines the always on Day lighting schedule for the vegitating period
 
  switch (lightSwitchOnOff){
  case '0':
    digitalWrite(lightGrowBlue, HIGH);
    digitalWrite(lightGrowRed, HIGH);
    digitalWrite(lightGrowPrimaryRed, HIGH);
    if (stateGrowPhase == LOW){
      lightSwitchOnOff = 1;
    }
    case '1':
    break;
  }
  Serial.print("Grow Lights are on"), Serial.println("");
}

void flowerCycle() {
  //This function controls the lighting for the day/night cycle for the flowering period
  //evaluate clockHour with a boolean expression and use in switch

  char cycleLight[9] ;
  int cycleInt =0;
  char var1[3] ={clockHour};
  char var2[3] = {clockMinute};
  char var3[3] = {timer};
  cycleLight = String.concat(var1 + var2 + var3);
  cycleInt = cycleLight.toInt();
 
  switch (cycleInt) {
    case 00:
      digitalWrite(lightGrowBlue, HIGH);
      digitalWrite(lightGrowRed, HIGH);
      Serial.print("Grow Lights are on. Flowering Cycle"), Serial.println("");
      break;
    case 170:
      digitalWrite(lightGrowBlue, LOW);
      digitalWrite(lightGrowRed, LOW);
      Serial.print("Grow lights are off. Flowering Cycle"), Serial.println("");
      break;
  }
} 

void powerOff(){

}

void powerOn(){

}

making vague hints at something takes time to process and is incredibly frustrating and time consuming to figure out..

You're going to hate the C++ compiler and debugging.

 int timer = 0;
int clockSecond = 0;
int clockMinute = 0;
int clockHour = 0;
..
..
char var1[3] ={clockHour};
  char var2[3] = {clockMinute};
  char var3[3] = {timer};

Tell us what you think this does.

one initializes the variables to 0 and the other converts them into a char variable with space for 2 characters. I've tried with strings, and still no avail.

char var1[3] ={clockHour};

Imagine clockHour (a sixteen bit variable) contains the value 12.
So var1 is a three element char array.
The first element has the value 12.
The other two elements are zero.

Is that what you intended?

correct, and then concatenate them to look like 1200 and back to an integer to test against

No, sorry, not following you.

to determine which switch to run in the proceeding code, i'm converting the time stamps into char's, concatenating them into one number and then converting them back, since I can't concatenate numbers with a function in Arduino(from everything I've read today). that number is then ran through the switch

I've changed the following lines of code

  String cycleLight ;
  int cycleInt =0;
  String var1 =String(clockHour);
  String var2 = String(clockMinute);
  String var3 = String(clockSecond);
  cycleLight = String.concat(var1 + var2 + var3);

i'm now receiving the follwing error

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

D:\Aeroponics Controller V3\Aeroponicsv6\Aeroponicsv6.ino: In function 'void flowerCycle()':

Aeroponicsv6:225: error: expected primary-expression before '.' token

cycleLight = String.concat(var1 + var2 + var3);

^

exit status 1
expected primary-expression before '.' token

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

resolved with this line

cycleLight = var1 + var2 + var3;

At 3 seconds after the 7th minute of the 8th hour of the day, cycleLight will contain "873". What, EXACTLY, do you intend to do with that String?

That String is almost certainly useless for whatever it is you intend to use it for.

If you absolutely MUST have a string (NOT a freaking String), sprintf() can be used to make "080703", which MIGHT prove useful later.