fixing docs issues
This commit is contained in:
parent
fe7b06d763
commit
9d15c4e270
@ -1,51 +0,0 @@
|
|||||||
# tell microphone to
|
|
||||||
|
|
||||||
The tell microphone to function.
|
|
||||||
|
|
||||||
Access the audio recording capabilities of the device using the ``tell microphone to`` function.
|
|
||||||
|
|
||||||
The functions in the antenna namespace allow the BBC micro:bit to communicate with a separate (remote) device, such as a smartphone, over Bluetooth (Smart). The set of supported events will depend on the remote device and the BBC micro:bit apps available for the remote device.
|
|
||||||
|
|
||||||
### Block Editor
|
|
||||||
|
|
||||||
![](/static/mb/tell-microphone-to-0.png)
|
|
||||||
|
|
||||||
### JavaScript
|
|
||||||
|
|
||||||
```sig
|
|
||||||
export function tellMicrophoneTo(event: string)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
* event - an event identifier
|
|
||||||
|
|
||||||
### Event values
|
|
||||||
|
|
||||||
* play
|
|
||||||
* stop
|
|
||||||
* pause
|
|
||||||
* forward
|
|
||||||
* rewind
|
|
||||||
* volume up
|
|
||||||
* volume down
|
|
||||||
* previous track
|
|
||||||
* next track
|
|
||||||
|
|
||||||
### Examples
|
|
||||||
|
|
||||||
To tell the connected device to start recording audio
|
|
||||||
|
|
||||||
```blocks
|
|
||||||
devices.tellMicrophoneTo("start capture")
|
|
||||||
```
|
|
||||||
|
|
||||||
To tell the connected device to stop recording audio
|
|
||||||
|
|
||||||
```blocks
|
|
||||||
devices.tellMicrophoneTo("stop capture")
|
|
||||||
```
|
|
||||||
|
|
||||||
```package
|
|
||||||
microbit-devices
|
|
||||||
```
|
|
@ -29,7 +29,7 @@ pins.servoWritePin(AnalogPin.P0, 90)
|
|||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
let millig = input.acceleration(Dimensions.X)
|
let millig = input.acceleration(Dimension.X)
|
||||||
// map accelerometer readings to angle
|
// map accelerometer readings to angle
|
||||||
let angle = pins.map(millig, -1023, 1023, 0, 180)
|
let angle = pins.map(millig, -1023, 1023, 0, 180)
|
||||||
pins.servoWritePin(AnalogPin.P0, angle)
|
pins.servoWritePin(AnalogPin.P0, angle)
|
||||||
|
Loading…
Reference in New Issue
Block a user