View unanswered posts | View active topics It is currently Sun Nov 23, 2014 12:31 pm






Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
motor not moving!! 
Author Message
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post 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
Profile
Rookie

Joined: Fri Oct 24, 2008 1:25 pm
Posts: 14
Post 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 :breakcomputer: *pulling out hair*
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

_________________
i poke you for information :poke: plz help
programer for norstar invention group


Mon Nov 03, 2008 3:37 pm
Profile
Rookie

Joined: Fri Oct 24, 2008 1:25 pm
Posts: 14
Post 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 :poke: plz help
programer for norstar invention group


Mon Nov 03, 2008 3:39 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post Re: motor not moving!!
jyoungj wrote:
i also use the robotc that they sent us to use. it that the new one :?:

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
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post 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 :breakcomputer: *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
Profile
Rookie

Joined: Fri Oct 24, 2008 1:25 pm
Posts: 14
Post Re: motor not moving!!
not robotc the NXT.

_________________
i poke you for information :poke: plz help
programer for norstar invention group


Wed Nov 05, 2008 2:19 pm
Profile
Rookie

Joined: Fri Oct 24, 2008 1:25 pm
Posts: 14
Post Re: motor not moving!!
got the motors working with ver 1.46. now for the servos :D
the only problem is that one goes forward and the other goes backward. reversing the

_________________
i poke you for information :poke: plz help
programer for norstar invention group


Fri Nov 07, 2008 4:45 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 613
Post 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
Profile
Rookie

Joined: Fri Oct 24, 2008 1:25 pm
Posts: 14
Post 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 :poke: plz help
programer for norstar invention group


Mon Nov 10, 2008 3:45 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 613
Post 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
Profile
Rookie

Joined: Fri Oct 24, 2008 1:25 pm
Posts: 14
Post 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 :poke: plz help
programer for norstar invention group


Wed Nov 12, 2008 3:52 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 613
Post 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
Profile
Rookie

Joined: Fri Oct 24, 2008 1:25 pm
Posts: 14
Post Re: motor not moving!!
oh well thanks for the info, time to make my brain work
:programmer: *crash* :downloading:
did not work, :shock: crap :breakcomputer:
just kid :lol:

_________________
i poke you for information :poke: plz help
programer for norstar invention group


Tue Nov 18, 2008 2:36 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 28 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.