var manager: CBCentralManager! var peripheral: CBPeripheral! var readCharacteristic: CBCharacteristic? var writeCharacteristic: CBCharacteristic? var notifyCharacteristic: CBCharacteristic? @Published var data:[UInt8] = [0,0]{ didSet{ send(data) print("0?? Dato Inviato: (data)") } } func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { switch characteristic.uuid { if let value = characteristic.value { if self.feedbackRfid == true { self.rfid = value.byte() print(" (rfid)") func byte() -> String{ return map{ String(UInt32($0)) }.joined() }
2.1m questions
2.1m answers
60 comments
57.0k users