diff --git a/main.ts b/main.ts index 23902bc..b6e3060 100644 --- a/main.ts +++ b/main.ts @@ -67,6 +67,7 @@ namespace neZha { iic_buffer[2] = speed; iic_buffer[3] = 0; pins.i2cWriteBuffer(neZha_address, iic_buffer); + basic.pause(10) pins.i2cWriteBuffer(neZha_address, iic_buffer); break; case MotorList.M2: @@ -81,6 +82,7 @@ namespace neZha { iic_buffer[2] = speed; iic_buffer[3] = 0; pins.i2cWriteBuffer(neZha_address, iic_buffer); + basic.pause(10) pins.i2cWriteBuffer(neZha_address, iic_buffer); break; case MotorList.M3: @@ -95,6 +97,7 @@ namespace neZha { iic_buffer[2] = speed; iic_buffer[3] = 0; pins.i2cWriteBuffer(neZha_address, iic_buffer); + basic.pause(10) pins.i2cWriteBuffer(neZha_address, iic_buffer); break; case MotorList.M4: @@ -109,6 +112,7 @@ namespace neZha { iic_buffer[2] = speed; iic_buffer[3] = 0; pins.i2cWriteBuffer(neZha_address, iic_buffer); + basic.pause(10) pins.i2cWriteBuffer(neZha_address, iic_buffer); break; default: diff --git a/pxt.json b/pxt.json index 547cf9a..0c62e25 100644 --- a/pxt.json +++ b/pxt.json @@ -16,7 +16,7 @@ ], "public": false, "targetVersions": { - "target": "4.0.11", + "target": "4.0.18", "targetId": "microbit" }, "supportedTargets": [