Error compiling sketch

I am currently working on another Aquarium Controller to include weather patterns, lightning storms and moon-phases....right now I am receiving the following error when I try to compile it.

In file included from C:\Arduino\hardware\arduino\cores\arduino/WProgram.h:6,
                 from My_weather_lightning.cpp:35:
c:/arduino/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'
c:/arduino/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'
c:/arduino/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

Without seeing the code that you are trying to compile, it is extremely tricky to tell what has gone wrong. Looking at line 439 of math.h:

double round (double __x) __ATTR_CONST__;

This is a function prototype for round(). Perhaps somewhere along the line you are defining a macro round via #define. That would mess up the meaning of this declaration.

Part 1

#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>                  
#include <DS1307.h>
#include <stdio.h>
#include <WProgram.h>
#include <WString.h>
#include <LiquidCrystal.h>
#define ONE_WIRE_BUS 52 //Define the pin of the DS18B20

int ledfan = 49;              // Fan 
int ph_1 =  32;            // PowerHead 1
int ph_2 =  33;            // PowerHead 2
int heater = 31;           // Heater
//int fuge = 30;             // fuge light
int moonled = 2;              // moon light 
int alarmpin = 35;            // Alarm
int blueled = 10; //currently controlling both PWM
int whiteled = 11;

LiquidCrystal lcd(22,23,24,25,26,27); //My diy circuit layout use this if you copy my board

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

int alarm_high_temp = 84;
int heater_on_temp = 78; 
int heater_off_temp = 79;
int fan_on_temp = 81; // cooling fans
int fan_off_temp = 80; // cooling fans
int counter_delay =0;
int weatherinterval = 240;//minutes between changes

int lights_on = 500;
int lights_off = 2200;
long prevdata = 0;
long previousMillis = 0;
long prevMillis = 0;
long preMillis = 0;
long prevweather = 0;
long weatherMillis =0;
long lightningMillis =0;
long prevlightning =0;
long cloudMillis =0;
long prevclouds=0;
long ltmillis =0;
long ctmillis =0;
long ctdmillis=0;
long atoMillis=0;
long stndbyMillis=0;
long wcMillis=0;
byte bled[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  //0-3:45
                0, 0, 0, 0, 0, 0, 0, 0, 23, 23, 23, 23, 23, 23, 23, 23, //4 - 7:45
                0, 0, 0, 0, 0, 0, 0, 0, 23, 30, 40, 50, 60, 70, 80, 90, //8 - 11:45
                100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 220, 240, 240, 240, 240,  //12 - 3:45 PM
                255, 255, 255, 255, 240, 240, 230, 220, 210, 200, 200, 180, 160, 150, 140, 130, //4 - 7:45 PM
                120, 110, 100, 90, 80, 60, 40, 25, 0, 0, 0, 0, 0, 0, 0, 0   //8 - 11:45 PM
                };  
byte wled[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  //0 - 3:45
                0, 0, 0, 0, 0, 0, 0, 0, 23, 23, 23, 23, 23, 23, 23, 23, //4 - 7:45
                0, 0, 0, 0, 0, 0, 0, 0, 23, 30, 40, 50, 60, 70, 80, 90, //8 - 11:45
                100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 220, 240, 240, 240, 240,  //12 - 3:45 PM
                255, 255, 255, 255, 240, 230, 220, 210, 200, 200, 180, 160, 150, 140, 130, 120, //4 - 7:45 PM
                110, 100, 70, 50, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0   //8 - 11:45 PM
                };  
int wled_out, bled_out;
int flash2[] = {255, 0, 0, 255,50,225, 0,0,0, 0, 200,0, 0, 0, 0, 23,0, 0, 23, 0, 0, 0,0, 50,0,0,0};
int flash[] = {255, 25,25, 255,225,225, 25,25,25,25, 255,25,25,25,25, 255,25, 25, 255, 25, 25, 25,25, 255,25,25,25};
int ledmode;
int flashvalue;
int weatherstate, lightningstate, cloudstate, moonphase, on_minute;
int  min_cnt, hour, minute, second, day, date, month, year, mil_time, alarmstate, alarmhour;

 //************************************************************************************SETUP****************************************************
 
  void setup(){
   
  Serial.begin(9600);  
  lcd.begin(4, 20);
  Wire.begin(); // Initialize the I2C bus

                      //********************************************initialize inputs/outputs**********************
  pinMode(ledfan, OUTPUT);  //LED HEATSINK PWM4
  pinMode(blueled, OUTPUT); 
  pinMode(whiteled, OUTPUT); 
  pinMode(alarmpin, OUTPUT);
  //pinMode(moonled, OUTPUT);
                  //**********************************************************RELAY CONTROLS******
  pinMode(heater, OUTPUT); // digital pin for heater as output
  pinMode(ph_1, OUTPUT); // digital pin for power head 1 as output
  pinMode(ph_2, OUTPUT); // digital pin for power head 2 as output

 //Un-comment to set the time 
  /*  RTC.stop();
  RTC.set(DS1307_SEC,01);        //set the seconds
  RTC.set(DS1307_MIN,56);     //set the minutes
  RTC.set(DS1307_HR,17);       //set the hours (military)
  RTC.set(DS1307_DOW,6);       //set the day of the week
  RTC.set(DS1307_DATE,9);       //set the date
  RTC.set(DS1307_MTH,1);        //set the month
  RTC.set(DS1307_YR,10);         //set the year
  RTC.start();*/
int ledmode = 1 ; //auto mode =1, manual =2
weatherstate = 1;  //start with bright,sunny day
alarmstate = 0;  //0=monitor, 1=mute 
}

//*************************************************************************************MAIN LOOP*****************************************************  

void loop(){

      get_time ();  //call to function
      print_time ();  //call to function
      lifesupport ();  //call to function
      GetPhase ();  //call to function
      moonlights ();  //call to function
      weather(240000);  //call to function
              if (weatherstate == 1)  //bright,sunny day
               { clouds (600000);} //random at 10mins
              if (weatherstate == 2)  //partly cloudy
                {clouds (600000);}  //random at 10mins
              if (weatherstate ==3)  //mostly cloudy
               { clouds (300000);} //random at 5mins
              if (weatherstate ==4)  //overcast, rain
                {clouds (60000); // random at 1min
                lightning (9000);}
              if (weatherstate ==5)  //thunderstorms
                {clouds (60000); //random at 1 min
                lightning (9000);}  
}    
//*************************************************************************************************************                
void lifesupport (){
                      
                    LED_levels_output ();
                    temp();
                    wavemaker ();  
                  }

//**************************************************************************************************************
void wavemaker (){
                      if(second <= 30) 
                      { 
                        digitalWrite(ph_1, LOW); digitalWrite(ph_2, HIGH);
                      }
                        else 
                      { 
                        digitalWrite(ph_1, HIGH); digitalWrite(ph_2, LOW);
                      }
}

//**********************************************************************************************************

void temp (){
                      
  sensors.requestTemperatures(); // Send the command to get temperatures
 delay(250);
  
  float temp1=0, temp2=0;
  
  
  temp1= sensors.getTempFByIndex(1);
  temp2= sensors.getTempFByIndex(0);
  lcd.setCursor(0, 1);
  lcd.print("W:");
  lcd.print(sensors.getTempFByIndex(0)); 
  lcd.print((char)223);
  lcd.print("F");
  lcd.setCursor(11, 1);
  lcd.print("L:");
  lcd.print(sensors.getTempFByIndex(1)); 
  lcd.print((char)223);
  lcd.print("F");


                    if ((temp1 >= 96) && (temp1 >=110))
                      {analogWrite(ledfan, 175) ;lcd.setCursor (2,3);lcd.print("Fan:Hi"); } //led fan on HI
                    if ((temp1 >= 90) && (temp1 <=95))
                      {analogWrite(ledfan, 100) ;lcd.setCursor (2,3);lcd.print("Fan:Lo");} //led fan on LOW
                    if (temp1 <= 89) 
                      {analogWrite(ledfan, 0) ; lcd.setCursor (2,3); lcd.print ("Fan:OFF");}  //led fan off
  
                    if (temp2 <= heater_on_temp)
                      {digitalWrite (heater, HIGH); lcd.setCursor (10,3);lcd.print("Heat:ON");}
                    if (temp2 >= heater_off_temp) 
                      {digitalWrite (heater, LOW); lcd.setCursor (10,3);lcd.print ("Heat:OFF");}
                    if ((alarmstate ==0)&&(temp2 >= alarm_high_temp)) {alarm(30, 8000);}                         
}

Part 2

void get_time (){
                     hour = RTC.get(DS1307_HR,true); 
                     day = RTC.get(DS1307_DOW,false);
                     minute = RTC.get(DS1307_MIN,false);
                     second = RTC.get(DS1307_SEC,false);
                     month = RTC.get(DS1307_MTH,false);
                     date =RTC.get(DS1307_DATE,false);
                     year = RTC.get(DS1307_YR,false);  //last two digits
                     mil_time = (hour * 100) + minute; //military time output  
                     min_cnt= (hour * 60)+ minute;   //used for LED aray
                   }

void print_time (){
                        lcd.setCursor(0,0); 
                         lcd.print (month); 
                         lcd.print ("/");
                         if (date < 10)  {lcd.print (" ");}
                         lcd.print (date); 
                         lcd.print("/");
                         lcd.print(year);
                          lcd.setCursor (12,0);
                          if((hour < 10 && hour > 0) || (hour > 12 && hour - 12 < 10))
                            {lcd.print(" ");
                          }
                          if(hour > 12)
                            {lcd.print(hour - 12, DEC); 
                          }
                          if(hour == 0)
                            {lcd.print(12, DEC);
                          }
                          if(hour > 0 && hour < 13)
                            {lcd.print(hour, DEC); 
                          }
                          lcd.print(":");
                          if(minute < 10)
                             {lcd.print("0"); 
                           }
                          lcd.print(minute, DEC);
                          if(hour < 12 || hour == 0)
                            {lcd.print("AM");
                          }
                          else
                            {lcd.print("PM");
                          }
                        }

void weather (long interval){
                
                     if (millis() - weatherMillis > interval) {
                         weatherMillis = millis();         
                         weatherstate = weather_randnumber(); }
                    }
    int weather_randnumber (){int w;  //used by weather function
                   if (millis() - prevweather > 10) {
                   prevweather = millis();  w=random(1,5);
                return w;}
                w=0;}                
                  

void lightning (long interval){
                  if (millis() - lightningMillis > interval) {
                   lightningMillis = millis(); 
                   lightningstate = lightning_randnumber();}
                 }
    int lightning_randnumber (){int lt;  //used by lightning function
                           if (millis() - prevlightning > 10) {
                           prevlightning = millis();  
                           if (weatherstate==5){lt=random(1,8);
                           if (weatherstate==4){lt=random(1,10);}
                        return lt;}
                        lt=0;}    
                       }         
 
            
void clouds (long interval){
                  if (millis() - cloudMillis > interval) {
                   cloudMillis = millis(); cloudstate = cloud_randnumber();}
                   }
 
    int cloud_randnumber (){int ct;  //used by clouds function
                                   if (millis() - prevclouds > 10) {
                                   prevclouds = millis(); 
                                      if (weatherstate ==5){ ct=random(1,3);}
                                      if (weatherstate ==4){ct=random(1,4);}
                                      else {ct=random(1,6);}
                                return ct;}
                                ct=0;}            
               
void moonlights (){
                    if ((mil_time >=700) && (mil_time <=2100)) //daytime
                        {analogWrite (moonled, 0);}  //moonlights off
                    else {analogWrite (moonled,moonphase);}} //moonlights on

Part 3

void LED_levels_output(){
                        int sector, sstep, t1, t2 ;
                      if (min_cnt>=1440) {min_cnt=1;}   // 24 hours of minutes
                            sector = min_cnt/15; sstep = min_cnt%15; t1 =sector; 
                        if (t1==95) {t2=0;}
                        else {t2 = t1+1;}
                        if (sstep==0)
                             {bled_out = bled[t1];
                              wled_out = wled[t1];}
                        else { bled_out = check(&bled[t1], &bled[t2], sstep);
                              wled_out = check(&wled[t1], &wled[t2], sstep);}
                      analogWrite(blueled, bled_out);
                      analogWrite(whiteled, wled_out);
                      if ((mil_time > lights_on) && (mil_time<lights_off));  //lightning only during specified time   
                               {  
                                 if (lightningstate == 1){  //active lightning state
                                      int i = 0; for (i=0;i<26;i++){flashvalue = flash[i];  //read flash array
                                       if (millis() - ltmillis > 125) {
                                         ltmillis = millis(); 
                                         analogWrite (whiteled, flashvalue);
                                         analogWrite (blueled, flashvalue);
                                         }}}  
                                if (cloudstate == 1){  //active cloudcover
                                      int i = 0; for (i=(bled_out);i>=26;i-=3)  //fade 3pts at a time down to 26pwm
                                          if (millis() - ctmillis > 750) {
                                             ctmillis = millis(); 
                                                 analogWrite (blueled,i);
                                                 analogWrite (whiteled,i);
                                               }
                                      for (i=26;i<=(bled_out);i+=3)  //fade up 3pts to ledout value
                                          {if (millis() - ctdmillis > 750) {
                                              ctdmillis = millis(); 
                                              analogWrite (blueled,i);
                                              analogWrite (whiteled,i);
                                            }}}
                                if (weatherstate ==5){  //thunderstorms
                                    if (bled_out >=50) { bled_out=(bled_out/2);}  //LED at 1/2 power
                                    if (bled_out >=50) { wled_out=(wled_out/2); }}}  //LED at 1/2 power
                     }   

  
        byte check( byte *pt1, byte *pt2, int lstep){  //used by LEDcontrol function
                        byte result; float fresult;
                        if (*pt1==*pt2) {result = *pt1;}   // No change
                        else if (*pt1<*pt2)                //Increasing brightness
                             {fresult = ((float(*pt2-*pt1)/15.0) * float(lstep))+float(*pt1);
                               result = byte(fresult);}
                        else {fresult = -((float(*pt1-*pt2)/15.0) * float(lstep))+float(*pt1);  //Decreasing brightness
                            result = byte(fresult);}
                        return result;
                      }


float GetPhase ()
                      {int yyear;
                      yyear = (2000 + year);
                      float phase;
                      double AG, IP;
                      long YY, MM, K1, K2, K3, JD;
                      YY = yyear - floor((12 - month) / 10);
                      MM = month + 9;
                      if (MM >= 12)
                          {MM = MM - 12;}
                      K1 = floor(365.25 * (YY + 4712));
                      K2 = floor(30.6 * MM + 0.5);
                      K3 = floor(floor((YY / 100) + 49) * 0.75) - 38;
                      JD = K1 + K2 + day + 59;
                      if (JD > 2299160)
                          {JD = JD - K3;}
                      IP = MyNormalize((JD - 2451550.1) / 29.530588853);
                      AG = IP*29.53;
                      phase = 0;
                      if ((AG < 1.) && (phase == 0)) {phase = 0; }//new; 0% illuminated
                      if ((AG < 1.84566) && (phase == 0)) {phase = 25; }//new; 0% illuminated
                       if ((AG < 3.7) && (phase == 0)) {phase = 40; }
                      if ((AG < 5.53699) && (phase == 0)) {phase = 65;} //Waxing crescent; 25% illuminated
                      if ((AG < 7.34566) && (phase == 0)) {phase = 95; }
                      if ((AG < 9.922831) && (phase == 0)) {phase = 130;} //First quarter; 50% illuminated
                      if ((AG < 11.3965) && (phase == 0)) {phase = 160;} 
                      if ((AG < 12.91963) && (phase == 0)) {phase = 190; }//Waxing gibbous; 75% illuminated
                      if ((AG < 14.5678) && (phase == 0)) {phase = 200;} 
                      if ((AG < 16.61096) && (phase == 0)) {phase = 255; }//Full; 100% illuminated
                      if ((AG < 20.30228) && (phase == 0)) {phase = 190; }//Waning gibbous; 75% illuminated
                      if ((AG < 23.99361) && (phase == 0)) {phase = 130; }//Last quarter; 50% illuminated
                      if ((AG < 27.68493) && (phase == 0)) {phase = 65; }//Waning crescent; 25% illuminated
                      if (phase == 0) {phase = 0; }//default to new; 0% illuminated
                   moonphase = phase;  //assign phase to global variable moonphase for other use
                 return phase; }
           
                 
        double MyNormalize(double v)  //used by getphase function
                    {v = v - floor(v); if (v < 0) v = v + 1;
                    return v;
                    } 
                    

void alarm (long duration, int freq) {
                      duration *= 1000;
                      int period = (1.0 / freq) * 1000000;
                      long elapsed_time = 0;
                      if (alarmstate ==0) 
                          {
                            while (elapsed_time < duration) {
                                  digitalWrite(alarmpin,HIGH);
                                  delayMicroseconds(period / 2);
                                  digitalWrite(alarmpin, LOW);
                                  delayMicroseconds(period / 2);
                                  elapsed_time += (period); 
                                      {alarmstate =1; alarmhour = hour;}
                                 }
                               }
                       }

void alarmreset (){                              
                      if ((alarmstate =1) && (alarmhour +4 == hour)){alarmstate = 0;}}  //resets after 4hrs

And ty for the help…

I am currently working on another Aquarium Controller to include weather patterns, lightning storms and moon-phases....right now I am receiving the following error when I try to compile it.

Good thing you didn't wait until the code got too big.

If you added some code that triggered the problem, then take a close look at that code. If you wrote all that code, and then tried to compile it, shame on you.

                                         }}}

Never a good thing to see. In my opinion, every { and every } goes on it's own line, and all the code in between is properly indented.

                      long YY, MM, K1, K2, K3, JD;

By convention, all capital letter names are reserved for #define statements. Violate convention at your own risk.

int ledfan = 49;              // Fan 
int ph_1 =  32;            // PowerHead 1
int ph_2 =  33;            // PowerHead 2
int heater = 31;           // Heater
//int fuge = 30;             // fuge light
int moonled = 2;

Are you planning on changing the values of these pin assignments at run-time?

AWOL: int ledfan = 49;              // Fan int ph_1 =  32;            // PowerHead 1 int ph_2 =  33;            // PowerHead 2 int heater = 31;           // Heater //int fuge = 30;             // fuge light int moonled = 2;

Are you planning on changing the values of these pin assignmentsat run-time?

Yes, they'll change have kinda been in a hurry :blush: due to me leaving for some much needed R&R.

Yes, they'll change

You're planning on pulling wires while the Arduino is running? Moderator edit: personal insult removed. Please play nicely together.

PaulS:

Yes, they'll change

You're planning on pulling wires while the Arduino is running? Moderator edit: personal insult removed. Please play nicely together.

Moderator edit: personal insult removed. Please play nicely together.

I've been doing electronics for 13 yrs and coding for 1..but being i'm a private military contractor i dont have time to sit around on my a@# to play.

I copied your code & compiled it, lot of errors without all the libraries, but also this error 3 times:

sketch_jul23a:-1: error: expected unqualified-id before ‘void’
sketch_jul23a:-1: error: expected constructor, destructor, or type conversion before ‘void’

I think the problem is the chunk of code below that occurs near the end.
These three things are not part of another function, and they don’t start with void, so they are not functions themselves, so I think they are getting flagged as an error for being before this function:

void alarm (long duration, int freq)

If you use Ctrl-T it will autoformat the code and make it easier to follow, will also catch any mismatched ( ) or { }

http://arduino.cc/en/Reference/Define
Apparently most programmers use
#define pin3 3 // for example
to assign a pin to a name, that way the program can’t accidentally reassign the varialbe with another value.
I’ve written many programs and use int and byte to assign names to pins, I have not had any occurrences of my software reassigning the pins on me, guess I was thorough enough reviewing the code to not use names unintentionally like that.
(tho I did have to fix lots of missing ;s and mismatched () and { } when I started)
I don’t know if that creates a compile error - maybe it is something one would want to do, like software multiplexing an output to different IO or something.
Seems legit since = and == are both allowed inside “if statements”, something else that would seem nonvalid to me as hardware guy.

byte check( byte *pt1, byte *pt2, int lstep){  //used by LEDcontrol function
  byte result; 
  float fresult;
  if (*pt1==*pt2) {
    result = *pt1;
  }   // No change
  else if (*pt1<*pt2)                //Increasing brightness
  {
    fresult = ((float(*pt2-*pt1)/15.0) * float(lstep))+float(*pt1);
    result = byte(fresult);
  }
  else {
    fresult = -((float(*pt1-*pt2)/15.0) * float(lstep))+float(*pt1);  //Decreasing brightness
    result = byte(fresult);
  }
  return result;
}


float GetPhase ()
{
  int yyear;
  yyear = (2000 + year);
  float phase;
  double AG, IP;
  long YY, MM, K1, K2, K3, JD;
  YY = yyear - floor((12 - month) / 10);
  MM = month + 9;
  if (MM >= 12)
  {
    MM = MM - 12;
  }
  K1 = floor(365.25 * (YY + 4712));
  K2 = floor(30.6 * MM + 0.5);
  K3 = floor(floor((YY / 100) + 49) * 0.75) - 38;
  JD = K1 + K2 + day + 59;
  if (JD > 2299160)
  {
    JD = JD - K3;
  }
  IP = MyNormalize((JD - 2451550.1) / 29.530588853);
  AG = IP*29.53;
  phase = 0;
  if ((AG < 1.) && (phase == 0)) {
    phase = 0; 
  }//new; 0% illuminated
  if ((AG < 1.84566) && (phase == 0)) {
    phase = 25; 
  }//new; 0% illuminated
  if ((AG < 3.7) && (phase == 0)) {
    phase = 40; 
  }
  if ((AG < 5.53699) && (phase == 0)) {
    phase = 65;
  } //Waxing crescent; 25% illuminated
  if ((AG < 7.34566) && (phase == 0)) {
    phase = 95; 
  }
  if ((AG < 9.922831) && (phase == 0)) {
    phase = 130;
  } //First quarter; 50% illuminated
  if ((AG < 11.3965) && (phase == 0)) {
    phase = 160;
  } 
  if ((AG < 12.91963) && (phase == 0)) {
    phase = 190; 
  }//Waxing gibbous; 75% illuminated
  if ((AG < 14.5678) && (phase == 0)) {
    phase = 200;
  } 
  if ((AG < 16.61096) && (phase == 0)) {
    phase = 255; 
  }//Full; 100% illuminated
  if ((AG < 20.30228) && (phase == 0)) {
    phase = 190; 
  }//Waning gibbous; 75% illuminated
  if ((AG < 23.99361) && (phase == 0)) {
    phase = 130; 
  }//Last quarter; 50% illuminated
  if ((AG < 27.68493) && (phase == 0)) {
    phase = 65; 
  }//Waning crescent; 25% illuminated
  if (phase == 0) {
    phase = 0; 
  }//default to new; 0% illuminated
  moonphase = phase;  //assign phase to global variable moonphase for other use
  return phase; 
}


double MyNormalize(double v)  //used by getphase function
{
  v = v - floor(v); 
  if (v < 0) v = v + 1;
  return v;
}

@OP :

Are you planning on changing the values of these pin assignmentsat run-time?

Was meant to be a gentle reminder that pin numbers are best declared as "const" so that they don't accidentally get changed at run time, particularly in such a large program.

I'm sorry if the subtlety was lost.

AWOL: @OP :

Are you planning on changing the values of these pin assignmentsat run-time?

Was meant to be a gentle reminder that pin numbers are best declared as "const" so that they don't accidentally get changed at run time, particularly in such a large program.

I'm sorry if the subtlety was lost.

Oh no....I took no offense to your reminder AWOL.....being called stupid by someone else kinda pissed me off like I dont know what i'm doing.

being called stupid by someone else kinda pissed me off like I dont know what i'm doing.

My comment was out of line, and for that I apologize. I was simply stunned by the statement that the pin numbers would of course change. This implies that you will be changing what is plugged in while the Arduino is running, which is what I considered (insult removed).