Update links
@ -9,7 +9,7 @@ Many thanks to Google engineer [**Liz Looney**](https://github.com/lizlooney) fo
|
|||||||
|
|
||||||
_Spoken audio plays on the **RC phone** using TextToSpeech commands, found in the Android menu of Blocks. This tutorial covers speech on the **DS devices** using other commands in the Telemetry menu._
|
_Spoken audio plays on the **RC phone** using TextToSpeech commands, found in the Android menu of Blocks. This tutorial covers speech on the **DS devices** using other commands in the Telemetry menu._
|
||||||
|
|
||||||
_A [different tutorial](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing-Audio-Files) shows how FTC Blocks can play short **recorded** sound files on the RC phone and DS devices._
|
_A [different FTC Wiki tutorial](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing-Audio-Files) shows how FTC Blocks can play short **recorded** sound files on the RC phone and DS devices._
|
||||||
|
|
||||||
## Step 1 - Telemetry.speak
|
## Step 1 - Telemetry.speak
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ This waiting technique works best in **Autonomous** programs, where programmed e
|
|||||||
|
|
||||||
Using timers in a **TeleOp** program (_iterative_ OpMode) is different. The above code samples appear in the OpMode's **INIT section** (before `waitForStart`), to simply introduce the concept of waiting for audio to finish. Do **not** use the above samples in the **RUN section** of a real FTC TeleOp OpMode. See the Advanced Topic below, called [Sound triggers in TeleOp](#sound-triggers-in-teleop).
|
Using timers in a **TeleOp** program (_iterative_ OpMode) is different. The above code samples appear in the OpMode's **INIT section** (before `waitForStart`), to simply introduce the concept of waiting for audio to finish. Do **not** use the above samples in the **RUN section** of a real FTC TeleOp OpMode. See the Advanced Topic below, called [Sound triggers in TeleOp](#sound-triggers-in-teleop).
|
||||||
|
|
||||||
_Note: more uses of Timers in FTC Blocks are described in [this tutorial](https://github.com/WestsideRobotics/FTC-Timers/wiki#timer-examples)._
|
_Note: more uses of Timers in FTC Blocks are described in [this FTC Wiki tutorial](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Timers-in-FTC-Blocks#timer-examples)._
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ Another technique is to set a Boolean variable, or 'flag', to indicate the butto
|
|||||||
|
|
||||||
<p align="center">[[/images/Driver-Station-Speech-Telemetry/1030-TeleOp-sounds-circle.png|]]<p>
|
<p align="center">[[/images/Driver-Station-Speech-Telemetry/1030-TeleOp-sounds-circle.png|]]<p>
|
||||||
|
|
||||||
You can also use a **timer and Boolean together**. This is shown as Example #5 called [Device timer in TeleOp](https://github.com/WestsideRobotics/FTC-Timers/wiki#5-device-timer-in-teleop), at a separate FTC Blocks [timers tutorial](https://github.com/WestsideRobotics/FTC-Timers/wiki).
|
You can also use a **timer and Boolean together**. This is shown as Example #5 called [Device timer in TeleOp](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Timers-in-FTC-Blocks#5-device-timer-in-teleop), at a separate [timers tutorial](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Timers-in-FTC-Blocks) in the FTC Wiki.
|
||||||
|
|
||||||
All these solutions can also be used when the audio is **triggered by a sensor** or other event on the robot. However if the audio starts when a touch sensor is pressed, for example, the playback could keep starting continuously if the sensor stays "pressed". Annoying! Use a timer and/or flag to initiate a **single start**, allowing the iterative OpMode to continue looping without repeating the audio starts.
|
All these solutions can also be used when the audio is **triggered by a sensor** or other event on the robot. However if the audio starts when a touch sensor is pressed, for example, the playback could keep starting continuously if the sensor stays "pressed". Annoying! Use a timer and/or flag to initiate a **single start**, allowing the iterative OpMode to continue looping without repeating the audio starts.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user