This commit is contained in:
Juri
2020-08-19 22:03:58 +02:00
parent 4ef7b9318f
commit 3152215415
291 changed files with 9511 additions and 2966 deletions

View File

@ -48,7 +48,7 @@ keeper @boardname@, you can press button `B` on the remote to buzz and
make the score bigger on the other @boardname@.
```blocks
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonPressed(Button.B, () => {
pins.digitalWritePin(DigitalPin.P1, 1);
basic.pause(500);
pins.digitalWritePin(DigitalPin.P1, 0);

View File

@ -46,7 +46,7 @@ will use ``digital write pin`` to make the other @boardname@ buzz and
make the score bigger.
```blocks
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonPressed(Button.B, () => {
pins.digitalWritePin(DigitalPin.P1, 1);
basic.pause(500);
pins.digitalWritePin(DigitalPin.P1, 0);

View File

@ -11,7 +11,7 @@ is connected to ``GND`` (0 volts), then when you press the button,
button press.
```sig
pins.setPull(DigitalPin.P9, PinPullMode.PullDown);
pins.setPull(DigitalPin.C9, PinPullMode.PullDown);
```
The pull-up and -down resistors are about 13kOhm.

View File

@ -30,7 +30,7 @@ The default number of bits is `8` and the default mode value is `3`.
Set the pins and format for the SPI connection.
```blocks
pins.spiPins(DigitalPin.P15, DigitalPin.P14, DigitalPin.P13);
pins.spiPins(DigitalPin.C15, DigitalPin.C14, DigitalPin.C13);
pins.spiFormat(8, 3);
```

View File

@ -26,7 +26,7 @@ Read the value of the _WHOAMI_ register from the device connected to the SPI bus
```blocks
pins.digitalWritePin(DigitalPin.P0, 1);
pins.spiPins(DigitalPin.P15, DigitalPin.P14, DigitalPin.P13);
pins.spiPins(DigitalPin.C15, DigitalPin.C14, DigitalPin.C13);
pins.spiFormat(8, 3);
pins.spiFrequency(1000000);
pins.digitalWritePin(DigitalPin.P0, 0);

View File

@ -31,7 +31,7 @@ If you don't set the pins for the SPI connection, the default pin assignments ar
Set the pin assignments for a SPI connection to the default pins.
```blocks
pins.spiPins(DigitalPin.P15, DigitalPin.P14, DigitalPin.P13);
pins.spiPins(DigitalPin.C15, DigitalPin.C14, DigitalPin.C13);
```
## See also

View File

@ -28,7 +28,7 @@ Send the command to read the value of the _WHOAMI_ register from the device conn
```blocks
pins.digitalWritePin(DigitalPin.P0, 1);
pins.spiPins(DigitalPin.P15, DigitalPin.P14, DigitalPin.P13);
pins.spiPins(DigitalPin.C15, DigitalPin.C14, DigitalPin.C13);
pins.spiFormat(8, 3);
pins.spiFrequency(1000000);
pins.digitalWritePin(DigitalPin.P0, 0);