![]() |
Re: Programming FAQ
Here's one that i've been seeing a lot recently:
Q. How do i add kevin's [insert extra hardware name(e.g. camera, encoder, etc.)] code? A. Look at the readme in the files that come with it. they tell you exactly how to do it. |
Re: Programming FAQ
do i need to learn unix before i learn C? my mom has been telling me to do this before i attempt to learn c although i have gone through some of the tutorials and it does not seem to get mentioned anywhere.
|
Re: Programming FAQ
Quote:
|
Re: Programming FAQ
Where can I find the default code for MPLabs?
The Link: http://innovationfirst.com/FIRSTRobo...umentation.htm seems to be broken (or at least it won't load for me). Can I get the code anywhere else? |
Re: Programming FAQ
im have a bit of a problem, i've loaded the 2007 default code and now the controller moves the moters in reverse. did something happen to the program?
|
Re: Programming FAQ
Your motors are probably wired in reverse. Without additional sensors, your robot has no way of knowing which way the motors are actually turning (and even if it did, it doesn't know what you want as forward and backward until you add that). Try doing something like this:
Code:
pwm02 = 254 - p2_y;Code:
pwm02 = p2_y; |
Re: Programming FAQ
ok, thanks. now i have another question. is there a manual or a guide that teaches you how to program the hybrid mode?
|
Re: Programming FAQ
Quote:
It says autonomous mode, but hybrid is the same thing (just with IR inputs). |
How do I program to buttons?
I am new to C programming, and I was wondering if it is possible to program to buttons instead of joystick. I learned a lot in the short time I was programming and i hope to learn more.
|
Re: How do I program to buttons?
Quote:
|
Re: How do I program to buttons?
Quote:
|
Well the claw is sopposed to pick up pvc rings, the strategy we used is the claw goes in the middle of the ring and opens up to put pressure on the sides of the ring to pick it up. The problem is, I dont know how to make a code to use the buttons instead of joysticks to make that happen. ( it is a 2 pronged gripper that opens and closes using a servo module)
|
Re: Programming FAQ
Is this for the VEX platform?
And do you want to use the buttons on the back of the VEX transmitter? |
Yes this is ofr the VEX platform and I would like to use the buttons of the back of the transmitter
|
Re: Programming FAQ
If you are using EasyC what version are you using? V2, EasyC Pro?
The function calls are different between the versions. If you are using MPLAB to program, the default VEX code has an example of using the buttons. The following is a variation on that. The two buttons on one side are seen in the code as PWM_in5 and the two buttons on the other side arrive as PWM_in6. This code starts the claw in the middle (joystick rest) and moves it to one extreme when the down button is pushed and the other way when the up button is pushed. It holds the last position after a button is pressed. Code:
// Claw servo |
| All times are GMT -5. The time now is 08:25. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi