Skip to content

Commit 006de1b

Browse files
committed
Updated README
1 parent 28e2fb7 commit 006de1b

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SharpBrick.PoweredUp is a .NET implementation of the Bluetooth Low Energy Protoc
1010

1111
# Examples
1212

13-
***Note:** This is the current message driven interface. In future there will be a component model allowing a more comfortable access*
13+
***Note:** This is the current message driven interface. In future there will be a component model (`Hub`) allowing a more comfortable access*
1414

1515
## Discover Hubs (using raw bluetooth kernel)
1616

@@ -58,6 +58,16 @@ using (var kernel = new BluetoothKernel(poweredUpBluetoothAdapter, bluetoothAddr
5858
});
5959

6060
Console.Readline(); // allow the messages to be processed and displayed.
61+
62+
// fun with light on hub 0 and built-in LED on port 50
63+
var rgbLight = new RgbLight(protocol, 0, 50);
64+
await rgbLight.SetRgbColorsAsync(0x00, 0xff, 0x00);
65+
66+
// fun with motor on hub 0 and port 0
67+
var motor = new TechnicXLargeLinearMotor(protocol, 0, 0);
68+
await motor.GotoAbsolutePositionAsync(45, 10, 100, PortOutputCommandSpecialSpeed.Brake, PortOutputCommandSpeedProfile.None);
69+
await Task.Delay(2000);
70+
await motor.GotoAbsolutePositionAsync(-45, 10, 100, PortOutputCommandSpecialSpeed.Brake, PortOutputCommandSpeedProfile.None);
6171
}
6272
````
6373

@@ -95,16 +105,16 @@ using (var hub = await host.FindHub<TechnicMediumHub>(bluetoothAddresss: 1234))
95105
- [ ] Technic Medium Hub
96106
- .. other hubs depend on availability of hardware / contributions
97107
- Devices
98-
- [ ] Technic Medium Hub - Rgb Light
108+
- [X] Technic Medium Hub - Rgb Light
99109
- [ ] Technic Medium Hub - Current
100110
- [ ] Technic Medium Hub - Voltage
101111
- [ ] Technic Medium Hub - Temperature Sensor 1
102112
- [ ] Technic Medium Hub - Temperature Sensor 2
103113
- [ ] Technic Medium Hub - Accelerometer
104114
- [ ] Technic Medium Hub - Gyro Sensor
105115
- [ ] Technic Medium Hub - Tilt Sensor
106-
- [ ] Technic XLarge Motor
107-
- [ ] Technic Large Motor
116+
- [X] Technic XLarge Motor
117+
- [X] Technic Large Motor
108118
- Message Encoder
109119
- [X] [3.1 Common Message Header](https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#common-message-header)
110120
- [X] [3.2. Message Length Encoding](https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#message-length-encoding)

0 commit comments

Comments
 (0)