     break;
   case INPUT:
     if (IS_PIN_DIGITAL(pin)) {
-      Serial.println("input");
+      Serial.print("Set pin #"); Serial.print(pin); Serial.println(" to input");
       pinMode(PIN_TO_DIGITAL(pin), INPUT); // disable output driver
-      digitalWrite(PIN_TO_DIGITAL(pin), LOW); // disable internal pull-ups
+      if (AUTO_INPUT_PULLUPS) {
+        digitalWrite(PIN_TO_DIGITAL(pin), HIGH); // enable internal pull-ups
+      } else {
+        digitalWrite(PIN_TO_DIGITAL(pin), LOW); // disable internal pull-ups
+      }
       pinConfig[pin] = INPUT;
       
-      // MEME update so we have an update report
-      uint8_t tempport = pin/8;
-      uint8_t temppin = reportPINs[tempport];
-      reportDigitalCallback(tempport, temppin | (1<<(pin % 8)));
-      //
     }
     break;
   case OUTPUT:

  portValue = portValue & portConfigInputs[portNumber];
  // only send if the value is different than previously sent
  if(forceSend || previousPINs[portNumber] != portValue) {
    Serial.println(F("Sending update"));
    BLE_Firmata.sendDigitalPort(portNumber, portValue);
    previousPINs[portNumber] = portValue;
  }

#include <SPI.h>
#include <BLE_Firmata.h>
#include "Adafruit_BLE_UART.h"


#define AUTO_INPUT_PULLUPS true

// Connect CLK/MISO/MOSI to hardware SPI
// e.g. On UNO & compatible: CLK = 13, MISO = 12, MOSI = 11
