View unanswered posts | View active topics It is currently Mon Jul 28, 2014 1:49 am






Reply to topic  [ 7 posts ] 
RobotC and NXT-G could live togheter in the brick? 
Author Message
Rookie

Joined: Mon Feb 04, 2008 6:53 am
Posts: 3
Post RobotC and NXT-G could live togheter in the brick?
Hi all,

I have just bought the NXT kit and I'm very happy to play with it! :P

So I'm a newbie but I have some programming esperience and I like to use RobotC because I don't like very much the NXT-G style.

The question is: if you install the robotC firmware on the NXT brick then you can choose between RobotC and NXT-G or you can you use only rototC?

Many thanks.

Andrea


Mon Feb 04, 2008 7:03 am
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:44 am
Posts: 439
Location: Pittsburgh, PA
Post 
You are able to use both, but before you use the software you must download the firmware that is associated with that software. In other words, if you want to use ROBOTC, you must download the ROBOTC firmware to the robot. If you want to use NXT-G, you must download the NXT-G firmware to the robot.

_________________
Vu Nguyen
Software Training Development Team | Webmaster
Need more support? Use the ROBOTC Ticketing system

Robotc.net| Robomatter Store | Robotics Academy | CS2N


Mon Feb 04, 2008 10:32 am
Profile
Rookie

Joined: Mon Feb 04, 2008 6:53 am
Posts: 3
Post 
Ok thanks it is a bit boring but I can do it :o

Now I uploaded the RobotC firmware on the brick because I'd like to test the enviroment...it seems very nice, but with NTX-G is possible to control the motor by rotation, degree, and second. Is it possible to to the same with RobotC? (I hope I can ask it here).

Thanks

Andrea


Mon Feb 04, 2008 12:00 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:44 am
Posts: 439
Location: Pittsburgh, PA
Post 
For timing you can either use the wait1Msec(); command, or use an actual timer.

Code:
 
ClearTimer(T1);
while(time1[T1] < 5000)   //do this for 5 seconds
{
       motor[port3] = 127;
       motor[port2] = 127;
}


As far as specifying distance, you can use the returned values from SensorValue[encoderName] to check your conditions.

_________________
Vu Nguyen
Software Training Development Team | Webmaster
Need more support? Use the ROBOTC Ticketing system

Robotc.net| Robomatter Store | Robotics Academy | CS2N


Mon Feb 04, 2008 4:10 pm
Profile
Rookie

Joined: Sat Dec 22, 2007 7:02 pm
Posts: 7
Post 
Specific amount of rotation can be controled using nMotorEncoderTarget variable, like this :
Code:
nMotorEncoderTarget[motA] = 90 ;   // set target position
motor[motA] = 20 ;   // set motor speed
while(nMotorRunState[motA] != runStateIdle) ;  // wait for the target position to be reached


Wed Feb 06, 2008 6:20 pm
Profile
Rookie

Joined: Mon Feb 04, 2008 6:53 am
Posts: 3
Post 
Thanks!

Very nice....I like very much robotc but I have a lot of problem if I change the sensor ports.
I do it by the gui but sometime doesn't work, or maybe I don't know how to do exactly.

Thanks a lot

Andrea


Wed Feb 06, 2008 7:09 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post 
Hi Andrea

One thing RobotC has is a Motor and Sensors Setup wizard, it lets you set up the sensors for different ports and automatically puts the data into a header at the top of the program. You can then refer to the sensors depending on what you named the sensors in the wizard

Try it out, it is located under the robot menu at the top of the screen.

Scott B-)

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Thu Feb 07, 2008 2:40 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

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:  
cron



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