| Author |
Message |
|
Dick Swan
Creator
Joined: Fri Feb 09, 2007 9:21 am Posts: 613
|
 Re: motor not moving!!
 |  |  |  | jyoungj wrote: program is #pragma config(hubs, S1, HTMotor, HTServo, none, none) #pragma config(Motor, motorD, , tmotorNormal, PIDControl, ) . . .
|  |  |  |  |
I tried your program with the latest development version of ROBOTC and found two"errors" in the source code.: - A typo. 'hubs" should be "Hubs". I've fixed ROBOTC so that this is now letter-case independent in the next release. Meanwhile, a simple program edit wil fix it for you.
- A "duplicate variable" definition error for "TJoystick joystick;'. This variable is declared in the "#include file" and does not need to be redeclared. You can simply delete the code line in your program.
Both of these errors generated compiler warning messages. I compiled and downloaded the program. It runs fine and motor "A" is turning on/off with the press of button "1". There is one thing that you also require. You have to have the ROBOTC debugger running with the "Joystick Control" window open to have the PC game controller messages sent to the NXT robot. If this window is closed, then the buttons and joysticks are not sent! You can open this window from the debugger with the command "Robot -> Debugger Windows -> Joystick Control". Note that ROBOTC remembers open windows for the next time you run the debugger.
|
| Mon Nov 03, 2008 1:57 pm |
|
 |
|
jyoungj
Rookie
Joined: Fri Oct 24, 2008 1:25 pm Posts: 14
|
 Re: motor not moving!!
i use the debug windows. i got some help from another group but every time i try to run it the NXT frezzes up i need to take out the battery pack for a reboot. the changes in the program are: controler config. coustem>S1>hitecknick motor>hitecknick motor>none motors: A>none B>none C>none D>none E>none Mtr_S1_C2_1>atached(12v) Mtr_S1_C2_s>atached(12v) (in the joystick part of program i tried 2 different things) motor[motorD] motor[motorE] (and) motor[motorD] motor[mtr_S1_C2_1] motor[mtr_S1_C2_2] it downloads fine but every time i try to run it it frezzes up  *pulling out hair* HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
_________________i poke you for information  plz help programer for norstar invention group
|
| Mon Nov 03, 2008 3:37 pm |
|
 |
|
jyoungj
Rookie
Joined: Fri Oct 24, 2008 1:25 pm Posts: 14
|
 Re: motor not moving!!
i also use the robotc that they sent us to use. it that the new one 
_________________i poke you for information  plz help programer for norstar invention group
|
| Mon Nov 03, 2008 3:39 pm |
|
 |
|
Dick Swan
Creator
Joined: Fri Feb 09, 2007 9:21 am Posts: 613
|
 Re: motor not moving!!
The version of ROBOTC on the CD is not the latest one. You should download the version posted on this forum (first message, it is currently 1.46). The "What's New" command on the "Help" menu will tell you the changes from the CD version.
|
| Mon Nov 03, 2008 7:14 pm |
|
 |
|
Dick Swan
Creator
Joined: Fri Feb 09, 2007 9:21 am Posts: 613
|
 Re: motor not moving!!
 |  |  |  | jyoungj wrote: i use the debug windows. i got some help from another group but every time i try to run it the NXT frezzes up i need to take out the battery pack for a reboot. the changes in the program are: controler config. . . . it downloads fine but every time i try to run it it frezzes up  *pulling out hair* HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |  |  |  |  |
I cannot figure out from your post what's in your program. ROBOTC should not "freeze up". Even if your program has errors. Make sure you have downloaded and installed version 1.46 (see the first post in the forum for a link to the download). If you still get "freeze up" then email me your source code (or post on the forum) and I will look at what's wrong for you. My email is dickswan@sbcglobal.net.
|
| Mon Nov 03, 2008 7:19 pm |
|
 |
|
jyoungj
Rookie
Joined: Fri Oct 24, 2008 1:25 pm Posts: 14
|
 Re: motor not moving!!
not robotc the NXT.
_________________i poke you for information  plz help programer for norstar invention group
|
| Wed Nov 05, 2008 2:19 pm |
|
 |
|
jyoungj
Rookie
Joined: Fri Oct 24, 2008 1:25 pm Posts: 14
|
 Re: motor not moving!!
got the motors working with ver 1.46. now for the servos the only problem is that one goes forward and the other goes backward. reversing the
_________________i poke you for information  plz help programer for norstar invention group
|
| Fri Nov 07, 2008 4:45 pm |
|
 |
|
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 537
|
 Re: motor not moving!!
You can use the "reversed" checkbox in the Motors and Sensor Setup window to correct that issue.
It's basically inverses any motor commands so what looks like "forward" in your program is actually send as "backwards" to the motor.
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
| Mon Nov 10, 2008 10:20 am |
|
 |
|
jyoungj
Rookie
Joined: Fri Oct 24, 2008 1:25 pm Posts: 14
|
 Re: motor not moving!!
every thing works with the latest ver of the NXT firmware and robotc now i need to see if i can use the d-pad to control something and can you make a servo go backwards 
_________________i poke you for information  plz help programer for norstar invention group
|
| Mon Nov 10, 2008 3:45 pm |
|
 |
|
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 537
|
 Re: motor not moving!!
The "D-Pad" is called the POV-hat, and it's accessable with the joystick.joy1_pov variable. It returns a -1 when not pressed and a 0-7, depending upon the direction it is pressed.
The servos can only range between 0-255 for their positional values. I'm not sure what you mean by "negative"
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
| Tue Nov 11, 2008 10:26 am |
|
 |
|
jyoungj
Rookie
Joined: Fri Oct 24, 2008 1:25 pm Posts: 14
|
 Re: motor not moving!!
when i say "negitive" i want the servo to be reversed like the motor so two servos can be on oppisit sides on the same pole and thay can both retate it in the same direction and not have the servos on different axises.
_________________i poke you for information  plz help programer for norstar invention group
|
| Wed Nov 12, 2008 3:52 pm |
|
 |
|
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 537
|
 Re: motor not moving!!
Unfortunately that feature is not available natively in ROBOTC, so you'll have to program that yourself... consider it part of the programming challenge of this year's competition (we can't do everything for you)
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
| Thu Nov 13, 2008 12:48 am |
|
 |
|
jyoungj
Rookie
Joined: Fri Oct 24, 2008 1:25 pm Posts: 14
|
 Re: motor not moving!!
oh well thanks for the info, time to make my brain work  *crash* did not work,  crap just kid 
_________________i poke you for information  plz help programer for norstar invention group
|
| Tue Nov 18, 2008 2:36 pm |
|
|