     // set the channel as soon as we can
     // faster boot up times :)
     setChannelModule(channelIndex, bandIndex, 0);
-    Serial.begin(BAUDRATE);
+    
+    if (digitalRead(baudpin) == HIGH)
+    {
+            Serial.begin(9600);
+    }
+    else
+    {
+      Serial.begin(115200);    
+    }
 
     initFastADC();
 

#define SERIAL_DATA_DELIMITER '\n'

#include <avr/pgmspace.h>

#define BAUDRATE 115200

const uint16_t musicNotes[] PROGMEM = { 523, 587, 659, 698, 784, 880, 988, 1046 };



// ----------------------------------------------------------------------------
void setup() {
    // initialize digital pin 2 as an input.
    pinMode(baudpin, INPUT);
    
    // initialize digital pin 13 LED as an output.
    pinMode(led, OUTPUT);
    digitalHigh(led);
