Update the the connect code for 'inchworm' (#1545)
This commit is contained in:
parent
5855b1f384
commit
53e447c33c
@ -11,7 +11,7 @@ Remote control your inchworm with another @boardname@
|
|||||||
You will need one more @boardname@ for this part. By using the radio, we can control the inchworm with another @boardname@. Download the code below to the @boardname@ on the inchworm and then again onto a "controller" @boardname@. Whenever button **A** is pressed, the inchworm moves once.
|
You will need one more @boardname@ for this part. By using the radio, we can control the inchworm with another @boardname@. Download the code below to the @boardname@ on the inchworm and then again onto a "controller" @boardname@. Whenever button **A** is pressed, the inchworm moves once.
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
radio.onReceivedNumber(({ receivedNumber }) => {
|
radio.onReceivedNumber(function (receivedNumber: number) {
|
||||||
pins.servoWritePin(AnalogPin.P0, 0)
|
pins.servoWritePin(AnalogPin.P0, 0)
|
||||||
basic.pause(500)
|
basic.pause(500)
|
||||||
pins.servoWritePin(AnalogPin.P0, 180)
|
pins.servoWritePin(AnalogPin.P0, 180)
|
||||||
|
Loading…
Reference in New Issue
Block a user