1959Re: [bestinc] programming problems
- Oct 15, 2013Cameron,
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?
(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?
- << Previous post in topic Next post in topic >>