Loading ...
Sorry, an error occurred while loading the content.

1963RE: programming problems

Expand Messages
  • dmgauntt2002
    Oct 17, 2013

      Cameron,


      Run Michael Blazer's test code.  If the servo doesn't work as described, then try using a different channel on the Cortex, or connect a different servo and test that.


      If you run Michael Blazer's test code and establish that the hardware is working, then post the entire source code of the program that is having trouble.  For that matter, if you run the test code and it doesn't work with any of your servos, post the entire code of the test program.  When it comes to getting technical help over the internet, too much information is always better than too little.


      If you are using RobotC, then copying the source code should be easy. If you are using EasyC, then you will have to find the window (or the .c file) that contains the source code that EasyC generates from the GUI flowchart.


      - David Gauntt

      HMS Team Robot

      Blazer BEST




      ---In bestinc@yahoogroups.com, <cameron_newbold@...> wrote:

      I am from the killdeer school and don't worry about giving to much information i can usually follow just fine. when i tried to do this the servo started to respond but it wouldn't move any more that about 10 degrees or so and it was moving very rapidly between the 10 or so degrees and its original position. Do you know how to fix this?


      On Tuesday, October 15, 2013 8:33 PM, Michael Blazer <mblazer@...> wrote:
       
      Cameron,
        Have you tried compiling and downloading the default program?  (It's available here.)  This lets you test all your Cortex motor channels and several of the Joystick functions.  Once you can do this, you can start your own program.

      Start simple. Use a Joystick to control a Servo.
      1.  Connect a Servo to the Cortex Motor channel 2 (using the servo adapter cable).
      2. Start EasyC.
      3. Click on "New Standalone Project" and select "Joystick Project (WiFi)"
      3. Expand "Program Flow" and drag "While Loop" over and drop it under "Variables"
      4. Enter 1 in the dialog box and hit Enter.
        -  All programs must have a master WHILE loop.  The "While (1)" causes the program to run continuously until you shut the power off.  Without this, your program runs once and then stops.
      5. Under "Joystick" drag "Joystick to Servo" into the While loop.  Leave the Joystick and Channel set to 1, set the Motor to 2 and hit Enter
        -  This programs the Cortex to take the position of the Right joystick, left-right position and sets the servo to match.
      6.  Make sure you have the programming cable connected to the joystick and that the Cortex and Joystick are properly linked
      7.  Click on the "Build and Download" menu and select "Build and Download F7".  When you get the message that "The HEX file was successfully built", click Yes.  When the Terminal tab is displayed, your program has been successfully downloaded. (You can close the Loader window)
      8.  You now should be able to control the servo with the joystick.  (You may need to disconnect the programming cable)

      Let us know if this works or if you're still having trouble.
      P.S. What school and hub are you with?

      Good luck
      Mike Blazer
      SA BEST

      (Sorry if this is too much info, it might help others)



      On 10/15/2013 8:32 PM, cameron_newbold@... wrote:
       
      i am having problems where the motors and servos wont respond properly to the programming. what do i do?



    • Show all 8 messages in this topic