def write(*args)
      case args.count
        when 0
          raise ArgumentError, "missing arguments"
        when 1
          data = args.first
        else
          data = args
      end

      enable do
        case data
        when Numeric
          PiPiper.driver.spi_transfer(data)
        when Enumerable
          PiPiper.driver.spi_transfer_bytes(data)
        else
          raise ArgumentError, "#{data.class} is not valid data. Use Numeric or an Enumerable of numbers"
        end
      end
    end
def write(*args)
      case args.count
        when 0
          raise ArgumentError, "missing arguments"
        when 1
          data = args.first
        else
          data = args
      end

      enable do
        case data
        when Numeric
          PiPiper.driver.spi_transfer(data)
        when Enumerable
          PiPiper.driver.spi_transfer_bytes(data)
        else
          raise ArgumentError, "#{data.class} is not valid data. Use Numeric or an Enumerable of numbers"
        end
      end
    end
Write to the bus

 @example Write a single byte
   spi.write(0x22)

 @example Write multiple bytes
   spi.write(0x22, 0x33, 0x44)

 @return [Number|Array] data that came out of MISO during write