|
Page 1 of 1
|
[ 5 posts ] |
|
| Author |
Message |
|
scb
Rookie
Joined: Sun Oct 14, 2007 3:20 am Posts: 20 Location: Turin, Italy
|
 set motor flag
Hi folks!
I'm new on this forum and i'm a newbie with robotC.
I would to make a porting of one of my nxc program but i don't know how to set with robotC some motor's flag. I would to use these nxc specifications
thePower sbyte theOM byte OUT_MODE_MOTORON+OUT_MODE_BRAKE theRM byte OUT_REGMODE_IDLE theRS byte OUT_RUNSTATE_RUNNING thePorts byte[] OUT_B, OUT_C [...]
// initialize motors set thePower, 0 set theUF, UF_UPDATE_SPEED+UF_UPDATE_MODE setout thePorts, OutputMode, theOM, RegMode, theRM, RunState, theRS, UpdateFlags, theUF, Power, thePower set theUF, UF_UPDATE_SPEED
[...]
mov thePower, pid // Update motor power setout thePorts, UpdateFlags, theUF, Power, thePower
How i can do it?
thanks!
simon
|
| Sun Oct 14, 2007 3:34 am |
|
 |
|
starwarslegokid
Moderator
Joined: Wed Jan 31, 2007 3:39 am Posts: 298 Location: San Diego, California. USA
|
One way to learn about all the different motor commands for RobotC is to double click on Motors in the Code Templates Toolbar which is on the left side of the program. It will bring up a help file with brief descriptions and examples of all the different commands available.
You can double click any of the categories in the Templates window to view their descriptions. If you want a complete list of all the code commands in RobotC, Go to Window in the top menu and select Menu Level / Expert. Turn off RobotC and restart it and a complete list of all commands will be in the Code Templates Toolbar list.
Hope this helps, feel free to come back to ask more questions
Scott B-)
_________________Mmmm Legos B-) My Robot Projects: http://www.freewebs.com/robotprojects/
|
| Tue Oct 16, 2007 3:08 pm |
|
 |
|
scb
Rookie
Joined: Sun Oct 14, 2007 3:20 am Posts: 20 Location: Turin, Italy
|
thanks!
have you got some tutorials or a coockbook about robotc for lego NXT, please?
_________________ If the facts don't fit the theory, change the facts (A. Einstein)
|
| Thu Oct 18, 2007 4:28 am |
|
 |
|
starwarslegokid
Moderator
Joined: Wed Jan 31, 2007 3:39 am Posts: 298 Location: San Diego, California. USA
|
The next release of RobotC will have alot of revised help files, but there is no separate manual for RobotC. I strongly sugest using the Help files and the sample programs in conjunction to learn Robot C.
There is a curriculum available to buy but it is in an expensive classroom liscense
I found this site where all the different commands and the sample programs that go with the topic one the same page. Hope this helps
http://www.g7smy.dyndns.org/robotc/
Scott B-)
_________________Mmmm Legos B-) My Robot Projects: http://www.freewebs.com/robotprojects/
|
| Thu Oct 18, 2007 12:27 pm |
|
 |
|
scb
Rookie
Joined: Sun Oct 14, 2007 3:20 am Posts: 20 Location: Turin, Italy
|
thanks!
simon
_________________ If the facts don't fit the theory, change the facts (A. Einstein)
|
| Fri Oct 19, 2007 3:07 pm |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
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
|
|