I'm trying to make/translate the LED central sketch
into SwiftUI
// button is pressed, write 0x01 to turn the LED on
ledCharacteristic.writeValue((byte)0x01);
} else {
Serial.println("button released");
// button is released, write 0x00 to turn the LED off
ledCharacteristic.writeValue((byte)0x00);
}
by any chance, does anyone know how to send the 1 and the zero
in iOS Swift? Swift uses a Data structure that is very tricky to
deal with.
sorry about the off topic, but it's related, loosely