Merge branch 'master' of https://github.com/Microsoft/pxt-microbit
This commit is contained in:
commit
57dc26a127
@ -14,4 +14,5 @@ cache:
|
|||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
- built/cache
|
- built/cache
|
||||||
|
- libs/hello/built/cache
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Analog Pitch
|
# Analog Pitch
|
||||||
|
|
||||||
Emits a Pulse With Modulation (PWM) signal to the current pitch [pin](/device/pins). Use [analog set pitch pin](/reference/pins/analog-set-pitch-pin) to set the pitch pin.
|
Emits a Pulse With Modulation (PWM) signal to the current pitch [pin](/device/pins). Use [analog set pitch pin](/reference/pins/analog-set-pitch-pin) to set the current pitch pin.
|
||||||
|
|
||||||
```sig
|
```sig
|
||||||
pins.analogPitch(440, 300)
|
pins.analogPitch(440, 300)
|
||||||
|
@ -28,9 +28,7 @@ basic.forever(() => {
|
|||||||
|
|
||||||
#### ~hint
|
#### ~hint
|
||||||
|
|
||||||
If you are using **analog read pin** with another micro:bit
|
If you are using **analog read pin** with another micro:bit running **analog write pin**, then things can get tricky. Remember that the micro:bit that runs **analog set pin** writes 0's and 1's at a very high frequency to achieve an average of the desired value. Sadly, if you try to read that average from another micro:bit, then the micro:bit will either read 0 or 1023. You could try to read a higher number of values (e.g. a million) in a loop, then computer then average. Alternatively, you can plug in a capacitor in-between the two micro:bits.
|
||||||
running **analog write pin**, it is a good idea to check
|
|
||||||
**analog read pin** many times and then take an average.
|
|
||||||
|
|
||||||
#### ~
|
#### ~
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pxt-microbit",
|
"name": "pxt-microbit",
|
||||||
"version": "0.2.186",
|
"version": "0.2.190",
|
||||||
"description": "BBC micro:bit target for PXT",
|
"description": "BBC micro:bit target for PXT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"JavaScript",
|
"JavaScript",
|
||||||
@ -29,6 +29,6 @@
|
|||||||
"typescript": "^1.8.7"
|
"typescript": "^1.8.7"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pxt-core": "0.2.194"
|
"pxt-core": "0.2.200"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user