Announcement

Collapse
No announcement yet.

SDK Tutorial?

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

  • SDK Tutorial?

    I have been wondering about how to use the Android Studio SDK for a while, and the documentation (Click here for the link) does not really seem to explain it very well. Especially how to use things like the gyroscope in the phone. I've been trying to use that to move the robot depending on how the phone is rotated. Does anyone know a good tutorial on using the SDK? Thanks in advance.

  • #2
    What phone are you using? The gyro only exists in the Moto G.

    Comment


    • #3
      I see. I am using the ZTE Speed (I believe that is what it is called). Well, regardless of there not being a gyro, the documentation on the SDK is confusing. I think I can figure out how to make the motors turn, but how would I access things like the accelerometer or similar things? I am perplexed by the documentation.

      Comment


      • #4
        Originally posted by Nukurami View Post
        I see. I am using the ZTE Speed (I believe that is what it is called). Well, regardless of there not being a gyro, the documentation on the SDK is confusing. I think I can figure out how to make the motors turn, but how would I access things like the accelerometer or similar things? I am perplexed by the documentation.
        I'll take a look myself when I get a chance, but published specifications say the ZTE Speed has an accelerometer. Is it just that the API is not available?

        Comment


        • #5
          Originally posted by mhaeberli View Post
          I'll take a look myself when I get a chance, but published specifications say the ZTE Speed has an accelerometer. Is it just that the API is not available?
          The accelerators are accessible via the Android Sensor Manager
          See http://ftcforum.usfirst.org/showthre...-phone-sensors
          Mark Hancock
          Tigard Team Mentor

          Comment


          • #6
            I have seen that link and downloaded the OrientOp class (or whatever it is) and ran it, it works, but I just cannot understand how it works. I tried replicating it to figure it out, but to no avail. How does the accelerometer code work?

            Comment


            • #7
              Originally posted by Nukurami View Post
              I have seen that link and downloaded the OrientOp class (or whatever it is) and ran it, it works, but I just cannot understand how it works. I tried replicating it to figure it out, but to no avail. How does the accelerometer code work?
              Look at this link andthis one too. I know its complicated. They made it easier in API21; but, we are on API19; so, we have what we have. I believe the position vector uses both the accelerometers and the magnetometer. I played with it some and it sometimes it was correct and sometimes it was way off (even when there was no metal near to mess up the magnetometer. Right now I have other problems to chase that took priority. It would be great to be able to use the phone for positioning. I would love to hear your progress on it.

              Mark Hancock
              Tigard Team Mentor
              Mark Hancock
              Tigard Team Mentor

              Comment


              • #8
                Originally posted by Nukurami View Post
                I have been wondering about how to use the Android Studio SDK for a while, and the documentation (Click here for the link) does not really seem to explain it very well. Especially how to use things like the gyroscope in the phone. I've been trying to use that to move the robot depending on how the phone is rotated. Does anyone know a good tutorial on using the SDK? Thanks in advance.
                In the doc folder in the project, there is a folder called tutorial with pdf's of how to use the SDK.
                Vinay Jagan,
                Techie Titans FTC Team #9901
                http://techietitans-ftc.com

                Comment


                • #9
                  Originally posted by v.jagan View Post
                  In the doc folder in the project, there is a folder called tutorial with pdf's of how to use the SDK.
                  Correct, the link in question (https://cdn.rawgit.com/ftctechnh/ftc...doc/index.html) is something else, called a Javadoc. However, they are really useful once one gets the hang of the language and IDE, since they provide concise and specific information about all of the methods that are public for you to use. Similar references exist for Android (http://developer.android.com/reference/packages.html) and Java (http://docs.oracle.com/javase/8/docs/api/).

                  That being said, the PDFs, this forum, videos, and ##ftc on Freenode (webchat) are far better resources to learn the platform or get answers that the javadocs themselves cannot provide.
                  FTC6460 mentor (software+computer vision+electronics), FPGA enthusiast. In favor of allowing custom electronics on FTC bots.
                  Co-founder of ##ftc live chat for FTC programming--currently you may need to join and wait some time for help--volunteer basis only.

                  Comment

                  Working...
                  X