sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Sketchy Physics Servo help

    Scheduled Pinned Locked Moved SketchyPhysics
    5 Posts 4 Posters 1.5k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      KottonKing
      last edited by

      Basically what I'm trying to figure out is how to make a servo spin back and forth from clockwise to counter clockwise (or vise versa)from zero degrees (being the start point)to 90 degrees (being the end point)automatically without having to manually control it. (Example of manual control to auto: Make a hinge into a motor by altering the properties in the UI console.) Any help would be great. Thanks!

      1 Reply Last reply Reply Quote 0
      • P Offline
        phy
        last edited by

        you can do that by setting the min to 0 and the max to 90 and then putting this in the controller field

        [0,1][(frame/30)%2]
        

        you can change the 30 to any thing you want.

        Tableau de comparaison de Staxyn s'agit d'un mГ©dicament uniquement sur ordonnance.

        1 Reply Last reply Reply Quote 0
        • K Offline
          KottonKing
          last edited by

          Awesome! Thanks Phy. It works perfect.

          1 Reply Last reply Reply Quote 0
          • C Offline
            CPhillips
            last edited by

            Nice code Phy! I love how Ruby makes such a simple concise thing possible.

            1 Reply Last reply Reply Quote 0
            • C Offline
              camokid11
              last edited by

              @cphillips said:

              I love how Ruby makes such a simple concise thing possible.

              simple, i cant figure some of the stuff out, the best i can do is toogel script, kwyboard controls, and some frames. (although i do keep a document of all the scripts i find useful)

              If you can read this, thank a teacher.
              If you can read this in english, thank a soldier.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement