Skip to content

Commit 3cc7df6

Browse files
author
Nathan Kunicki
committed
Lights working on wedo2, added docs, bumped version
1 parent 7a3878f commit 3cc7df6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

ABOUT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ While most Powered UP components and Hubs are compatible with each other, there
3636
| Boost Color and Distance Sensor | Sensor | *Partial* | Yes | Yes | <a href="https://brickset.com/sets/17101-1/">17101</a> |
3737
| Boost Tacho Motor | Motor/Sensor | *Partial* | Yes | *Partial* | <a href="https://brickset.com/sets/17101-1/">17101</a> |
3838
| Powered Up Train Motor | Motor | Yes | Yes | Yes | <a href="https://brickset.com/sets/60197-1/">60197</a><br /><a href="https://brickset.com/sets/60198-1/">60198</a> |
39-
| Powered Up LED Lights | Light | Unknown | Unknown | Unknown | <a href="https://brickset.com/sets/88005-1/">88005</a> |
39+
| Powered Up LED Lights | Light | Yes | Yes | Yes | <a href="https://brickset.com/sets/88005-1/">88005</a> |
4040

4141

4242
### Known Issues and Limitations

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ While most Powered UP components and Hubs are compatible with each other, there
3636
| Boost Color and Distance Sensor | Sensor | *Partial* | Yes | Yes | <a href="https://brickset.com/sets/17101-1/">17101</a> |
3737
| Boost Tacho Motor | Motor/Sensor | *Partial* | Yes | *Partial* | <a href="https://brickset.com/sets/17101-1/">17101</a> |
3838
| Powered Up Train Motor | Motor | Yes | Yes | Yes | <a href="https://brickset.com/sets/60197-1/">60197</a><br /><a href="https://brickset.com/sets/60198-1/">60198</a> |
39-
| Powered Up LED Lights | Light | Unknown | Unknown | Unknown | <a href="https://brickset.com/sets/88005-1/">88005</a> |
39+
| Powered Up LED Lights | Light | Yes | Yes | Yes | <a href="https://brickset.com/sets/88005-1/">88005</a> |
4040

4141

4242
### Known Issues and Limitations

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-poweredup",
3-
"version": "1.0.12",
3+
"version": "1.1.0",
44
"description": "A Node.js module to interface with LEGO Powered UP components.",
55
"homepage": "https://github.com/nathankellenicki/node-poweredup/",
66
"main": "dist/poweredup.js",

wedo2smarthub.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,12 @@ export class WeDo2SmartHub extends Hub {
185185
public setLightBrightness (port: string, brightness: number, time?: number) {
186186
const portObj = this._portLookup(port);
187187
return new Promise((resolve, reject) => {
188-
const data = Buffer.from([portObj.value, 0x01, 0x02, this._mapSpeed(brightness)]);
189-
this._writeMessage(Consts.BLECharacteristics.LPF2_ALL, data);
188+
const data = Buffer.from([portObj.value, 0x01, 0x02, brightness]);
189+
this._writeMessage(Consts.BLECharacteristics.WEDO2_MOTOR_VALUE_WRITE, data);
190190
if (time) {
191191
setTimeout(() => {
192192
const data = Buffer.from([portObj.value, 0x01, 0x02, 0x00]);
193-
this._writeMessage(Consts.BLECharacteristics.LPF2_ALL, data);
193+
this._writeMessage(Consts.BLECharacteristics.WEDO2_MOTOR_VALUE_WRITE, data);
194194
return resolve();
195195
}, time);
196196
} else {

0 commit comments

Comments
 (0)