20 lines
472 B
Swift
20 lines
472 B
Swift
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
@EnvironmentObject var bluetoothManager: BluetoothManager
|
|
|
|
var body: some View {
|
|
VStack {
|
|
Text(bluetoothManager.status)
|
|
Button(action: bluetoothManager.led_on) {
|
|
Text("LED On")
|
|
}
|
|
Button(action: bluetoothManager.led_off) {
|
|
Text("LED Off")
|
|
}
|
|
}
|
|
.padding()
|
|
.buttonStyle(BorderedButtonStyle())
|
|
}
|
|
}
|