Skip to content

Commit

Permalink
default pin blocks to P0
Browse files Browse the repository at this point in the history
  • Loading branch information
Amerlander committed Nov 21, 2023
1 parent b9a1110 commit d278c63
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions libs/core/_locales/core-jsdoc-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,16 +574,16 @@
"pins.analogPitch|param|frequency": "frequency to modulate in Hz.",
"pins.analogPitch|param|ms": "duration of the pitch in milli seconds.",
"pins.analogReadPin": "Read the connector value as analog, that is, as a value comprised between 0 and 1023.",
"pins.analogReadPin|param|name": "pin to write to, eg: AnalogPin.P1",
"pins.analogReadPin|param|name": "pin to write to, eg: AnalogPin.P0",
"pins.analogSetPeriod": "Configure the pulse-width modulation (PWM) period of the analog output in microseconds.\nIf this pin is not configured as an analog output (using `analog write pin`), the operation has no effect.",
"pins.analogSetPeriod|param|micros": "period in micro seconds. eg:20000",
"pins.analogSetPeriod|param|name": "analog pin to set period to, eg: AnalogPin.P1",
"pins.analogSetPeriod|param|name": "analog pin to set period to, eg: AnalogPin.P0",
"pins.analogSetPitchPin": "Set the pin used when using analog pitch or music.",
"pins.analogSetPitchPin|param|name": "pin to modulate pitch from",
"pins.analogSetPitchVolume": "Sets the volume on the pitch pin",
"pins.analogSetPitchVolume|param|volume": "the intensity of the sound from 0..255",
"pins.analogWritePin": "Set the connector value as analog. Value must be comprised between 0 and 1023.",
"pins.analogWritePin|param|name": "pin name to write to, eg: AnalogPin.P1",
"pins.analogWritePin|param|name": "pin name to write to, eg: AnalogPin.P0",
"pins.analogWritePin|param|value": "value to write to the pin between ``0`` and ``1023``. eg:1023,0",
"pins.createBuffer": "Create a new zero-initialized buffer.",
"pins.createBuffer|param|size": "number of bytes in the buffer",
Expand Down Expand Up @@ -615,7 +615,7 @@
"pins.servoSetPulse|param|micros": "pulse duration in micro seconds, eg:1500",
"pins.servoSetPulse|param|name": "pin name",
"pins.servoWritePin": "Write a value to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft (in degrees), moving the shaft to that orientation. On a continuous rotation servo, this will set the speed of the servo (with ``0`` being full-speed in one direction, ``180`` being full speed in the other, and a value near ``90`` being no movement).",
"pins.servoWritePin|param|name": "pin to write to, eg: AnalogPin.P1",
"pins.servoWritePin|param|name": "pin to write to, eg: AnalogPin.P0",
"pins.servoWritePin|param|value": "angle or rotation speed, eg:180,90,0",
"pins.setAudioPin": "Set the pin used when producing sounds and melodies. Default is P0.",
"pins.setAudioPinEnabled": "Sets whether or not audio will be output using a pin on the edge\nconnector.",
Expand Down
10 changes: 5 additions & 5 deletions libs/core/pins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ namespace pins {

/**
* Read the connector value as analog, that is, as a value comprised between 0 and 1023.
* @param name pin to write to, eg: AnalogPin.P1
* @param name pin to write to, eg: AnalogPin.P0
*/
//% help=pins/analog-read-pin weight=25
//% blockId=device_get_analog_pin block="analog read|pin %name" blockGap="8"
Expand All @@ -347,7 +347,7 @@ namespace pins {

/**
* Set the connector value as analog. Value must be comprised between 0 and 1023.
* @param name pin name to write to, eg: AnalogPin.P1
* @param name pin name to write to, eg: AnalogPin.P0
* @param value value to write to the pin between ``0`` and ``1023``. eg:1023,0
*/
//% help=pins/analog-write-pin weight=24
Expand All @@ -363,7 +363,7 @@ namespace pins {
/**
* Configure the pulse-width modulation (PWM) period of the analog output in microseconds.
* If this pin is not configured as an analog output (using `analog write pin`), the operation has no effect.
* @param name analog pin to set period to, eg: AnalogPin.P1
* @param name analog pin to set period to, eg: AnalogPin.P0
* @param micros period in micro seconds. eg:20000
*/
//% help=pins/analog-set-period weight=23 blockGap=8
Expand Down Expand Up @@ -465,7 +465,7 @@ namespace pins {

/**
* Write a value to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft (in degrees), moving the shaft to that orientation. On a continuous rotation servo, this will set the speed of the servo (with ``0`` being full-speed in one direction, ``180`` being full speed in the other, and a value near ``90`` being no movement).
* @param name pin to write to, eg: AnalogPin.P1
* @param name pin to write to, eg: AnalogPin.P0
* @param value angle or rotation speed, eg:180,90,0
*/
//% help=pins/servo-write-pin weight=20
Expand Down Expand Up @@ -671,7 +671,7 @@ namespace pins {
/**
* Set the matrix width for Neopixel strip (already assigned to a pin).
* Should be used in conjunction with `set matrix width` from Neopixel package.
* @param name pin of Neopixel strip, eg: DigitalPin.P1
* @param name pin of Neopixel strip, eg: DigitalPin.P0
* @param value width of matrix (at least ``2``)
*/
//% help=pins/neopixel-matrix-width weight=3 advanced=true
Expand Down
10 changes: 5 additions & 5 deletions libs/core/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ declare namespace pins {

/**
* Read the connector value as analog, that is, as a value comprised between 0 and 1023.
* @param name pin to write to, eg: AnalogPin.P1
* @param name pin to write to, eg: AnalogPin.P0
*/
//% help=pins/analog-read-pin weight=25
//% blockId=device_get_analog_pin block="analog read|pin %name" blockGap="8"
Expand All @@ -757,7 +757,7 @@ declare namespace pins {

/**
* Set the connector value as analog. Value must be comprised between 0 and 1023.
* @param name pin name to write to, eg: AnalogPin.P1
* @param name pin name to write to, eg: AnalogPin.P0
* @param value value to write to the pin between ``0`` and ``1023``. eg:1023,0
*/
//% help=pins/analog-write-pin weight=24
Expand All @@ -771,7 +771,7 @@ declare namespace pins {
/**
* Configure the pulse-width modulation (PWM) period of the analog output in microseconds.
* If this pin is not configured as an analog output (using `analog write pin`), the operation has no effect.
* @param name analog pin to set period to, eg: AnalogPin.P1
* @param name analog pin to set period to, eg: AnalogPin.P0
* @param micros period in micro seconds. eg:20000
*/
//% help=pins/analog-set-period weight=23 blockGap=8
Expand Down Expand Up @@ -818,7 +818,7 @@ declare namespace pins {

/**
* Write a value to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft (in degrees), moving the shaft to that orientation. On a continuous rotation servo, this will set the speed of the servo (with ``0`` being full-speed in one direction, ``180`` being full speed in the other, and a value near ``90`` being no movement).
* @param name pin to write to, eg: AnalogPin.P1
* @param name pin to write to, eg: AnalogPin.P0
* @param value angle or rotation speed, eg:180,90,0
*/
//% help=pins/servo-write-pin weight=20
Expand Down Expand Up @@ -929,7 +929,7 @@ declare namespace pins {
/**
* Set the matrix width for Neopixel strip (already assigned to a pin).
* Should be used in conjunction with `set matrix width` from Neopixel package.
* @param name pin of Neopixel strip, eg: DigitalPin.P1
* @param name pin of Neopixel strip, eg: DigitalPin.P0
* @param value width of matrix (at least ``2``)
*/
//% help=pins/neopixel-matrix-width weight=3 advanced=true
Expand Down

0 comments on commit d278c63

Please sign in to comment.