Announcement

Collapse
No announcement yet.

Playing Sounds or Tones for debugging?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by FTC3805 View Post
    Analog output port
    -4 –+4 volts at 1mA

    from:
    http://modernroboticsinc.com/core-de...rface-module-2
    Okay, thank you. That's not enough to drive the speaker. I will have to add an audio amplifier then.

    Comment


    • #17
      mikets: Do you plan to drive the PZT directly from the output or put in some sort of amplifier so as not to over-draw the D/A drivers on the CDIM?

      Comment


      • #18
        Originally posted by zain View Post
        mikets: Do you plan to drive the PZT directly from the output or put in some sort of amplifier so as not to over-draw the D/A drivers on the CDIM?
        I am going to drive the speaker with an LM386 audio amplifier chip. Now this is really just for fun making it work to prove it can be done. In real application, I would just use the Android phone to play the audio. It's just a lot easier because the amplifier needs power and it would be a headache to figure out what FIRST would allow as "custom circuit that needs external power".

        Comment


        • #19
          In App Inventor we used the Text To Speech Block. This makes the android speech engine say words. There must be something similar in Android Studio.

          Comment


          • #20
            There is a TextToSpeech class that can speak a sentence you throw at it.
            https://developer.android.com/refere...tToSpeech.html

            Comment


            • #21
              Originally posted by mikets View Post
              There is a TextToSpeech class that can speak a sentence you throw at it.
              https://developer.android.com/refere...tToSpeech.html
              OK, that sounds like fun. "It's Robot Fighting Time!".....

              Comment


              • #22
                Originally posted by Philbot View Post
                OK, that sounds like fun. "It's Robot Fighting Time!".....
                Ooooh, I am having way too much fun!!!
                The TestVuforia sample code can now talk to you. When it finds the target it will say "Target legos is visible". When the target is out of sight, it will say "Target legos is not visible.".
                Here is the code:
                https://github.com/trc492/FtcSamples...stVuforia.java

                Comment


                • #23
                  Yeah, we found that text to speech is a lot of fun. Making the robot speak with button commands is a common occurrence. There is even speech to text so you can have a small conversation with the robot. Even though it is good for debugging in the lab and having lots of fun, we found that we could not hear the phone on the robot at the matches because the music and ambient noise was to loud. Last year we had the robot speak to us of what direction our "forward" was going but we could not hear it during the game. We will have to go back to a servo and arrow or use the telemetry feature.

                  Comment


                  • #24
                    Originally posted by FTC4217Coach View Post
                    Yeah, we found that text to speech is a lot of fun. Making the robot speak with button commands is a common occurrence. There is even speech to text so you can have a small conversation with the robot. Even though it is good for debugging in the lab and having lots of fun, we found that we could not hear the phone on the robot at the matches because the music and ambient noise was to loud. Last year we had the robot speak to us of what direction our "forward" was going but we could not hear it during the game. We will have to go back to a servo and arrow or use the telemetry feature.
                    Oh it is very useful for debugging. For example, when playing with Vuforia, the camera view is on the robot controller phone, so it is impossible to chase the robot to see if it sees the target. Granted that you can send the data to the Driver Station phone but I don't want to take my eyes off the robot to check the Driver Station phone, so have it speak to me when it sees the target is tremendously valuable.

                    Comment


                    • #25
                      Originally posted by mikets View Post
                      Oh it is very useful for debugging. For example, when playing with Vuforia, the camera view is on the robot controller phone, so it is impossible to chase the robot to see if it sees the target. Granted that you can send the data to the Driver Station phone but I don't want to take my eyes off the robot to check the Driver Station phone, so have it speak to me when it sees the target is tremendously valuable.
                      Another 'Eyes On" debugging technique is to use the internal red and blue LEDs on the DIM. Check out the enableLED() method.
                      There are two channels 0, and 1. Each channel controls one of the internal LEDs

                      Comment


                      • #26
                        Originally posted by Philbot View Post
                        Another 'Eyes On" debugging technique is to use the internal red and blue LEDs on the DIM. Check out the enableLED() method.
                        There are two channels 0, and 1. Each channel controls one of the internal LEDs
                        It depends on how you mount the DIM? It may not be easily visible.

                        Comment


                        • #27
                          Originally posted by Philbot View Post
                          Another 'Eyes On" debugging technique is to use the internal red and blue LEDs on the DIM. Check out the enableLED() method.
                          There are two channels 0, and 1. Each channel controls one of the internal LEDs
                          Using the red and blue LEDs on the DIM for debugging is a great idea!

                          If you have a Legacy Module, and have room on your bot, you can also use the Legacy Module's four [green] LEDs for debugging. The Legacy Module runs off of USB power (it doesn't need a 12V connection from the PDM) so it is easy to mount.

                          Comment


                          • #28
                            Originally posted by Alec View Post
                            Using the red and blue LEDs on the DIM for debugging is a great idea!

                            If you have a Legacy Module, and have room on your bot, you can also use the Legacy Module's four [green] LEDs for debugging. The Legacy Module runs off of USB power (it doesn't need a 12V connection from the PDM) so it is easy to mount.

                            Haven't used the legacy module yet - what are the commands to turn on/off the LEDs? thanks.

                            Comment

                            Working...
                            X