I currently have a function that intakes UInt16 and converts it into data to send over bluetooth.
Here is a snippet:
var integerToSend = UInt16(10)
let commandID = 0x07
let data = NSMutableData(bytes: &commandID, length: 1)
data.append(&integerToSend, length: 2)
I am now trying to write to a register that intakes 12 bit data. What would be the best way to comply with this format?