hotfix: codeformat
This commit is contained in:
parent
d4f63e8de3
commit
deefde7b50
2 changed files with 7 additions and 8 deletions
|
|
@ -119,9 +119,10 @@ Pattern.prototype.mqtt = function (
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// This adds the 'move' and 'motor' commands to strudel
|
// This adds the 'move' and 'motor' commands to strudel
|
||||||
export const { move, motor } = createParams('move', 'motor'); window.move = move; window.motor = motor;
|
export const { move, motor } = createParams('move', 'motor');
|
||||||
|
window.move = move;
|
||||||
|
window.motor = motor;
|
||||||
// This adds the 'robot' command
|
// This adds the 'robot' command
|
||||||
Pattern.prototype.robot = function (robot_id, address = 'ws://192.168.8.248:9001/mqtt') {
|
Pattern.prototype.robot = function (robot_id, address = 'ws://192.168.8.248:9001/mqtt') {
|
||||||
return this.mqtt(undefined, undefined, '/move/' + robot_id, address);
|
return this.mqtt(undefined, undefined, '/move/' + robot_id, address);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ Let's get a motor running!
|
||||||
|
|
||||||
3. Plug a motor into 'servo' (not motor) plug numbered 1, with the yellow (lightest) cable closest to the '1', and the brown (darkest) cable outward
|
3. Plug a motor into 'servo' (not motor) plug numbered 1, with the yellow (lightest) cable closest to the '1', and the brown (darkest) cable outward
|
||||||
|
|
||||||
4. Run the below to set up some values, changing the `x` in 'robot('x')` to the letter on your microcontroller.
|
4. Run the below to set up some values, changing the `x` in 'robot('x')` to the letter on your microcontroller.
|
||||||
|
|
||||||
<MiniRepl
|
<MiniRepl
|
||||||
client:visible
|
client:visible
|
||||||
|
|
@ -109,11 +109,9 @@ Alternatively, you can pattern two motors in separate patterns. The below sends
|
||||||
client:visible
|
client:visible
|
||||||
tune={`
|
tune={`
|
||||||
|
|
||||||
$: move("-10 0 10 [20 30]*2").motor("0").slow(2).robot('x');
|
$: move("-10 0 10 [20 30]\*2").motor("0").slow(2).robot('x');
|
||||||
|
|
||||||
$: move("-10 0 10 [20 30]*2").motor("1").slow(3).robot('x');
|
$: move("-10 0 10 [20 30]\*2").motor("1").slow(3).robot('x');
|
||||||
|
|
||||||
`}
|
`}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue