Subject:
|
Re: The standard NXT firmware & the case of the missing opcodes
|
Newsgroups:
|
lugnet.robotics.nxt.nxthacking
|
Date:
|
Thu, 23 Aug 2007 13:19:37 GMT
|
Viewed:
|
17332 times
|
| |
| |
In lugnet.robotics.nxt.nxthacking, John Hansen wrote:
> Here's a sample NBC program that uses these new opcodes:
If you download the test_release.zip that I uploaded late last night you will be
able to use these new opcodes (after installing the enhanced firmware in
lms_arm_jch.zip) in both NBC and NXC programs. Here is some sample NXC code:
task goofy()
{
int i=0;
while (true)
{
i++;
TextOut(0, LCD_LINE1, FormatNum("count = %d", i));
}
}
task normal()
{
start goofy;
Wait(500);
priority goofy, 1;
Wait(2000);
priority goofy, 10;
Wait(10000);
priority goofy, 30;
Wait(2000);
TextOut(0, LCD_LINE7, "stop goofy");
stop goofy;
TextOut(0, LCD_LINE8, "goofy stopped");
Wait(2000);
}
task main()
{
start normal;
}
|
|
Message is in Reply To:
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|