Subject:
|
Use of lnp_addressing_write() in an RCX program.
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Tue, 24 Feb 2004 21:50:04 GMT
|
Viewed:
|
4645 times
|
| |
| |
Hello all. I wrote a small program using lnp_addressing_write() to remotely
change the host address of one RCX from another. It doesn't work. I get an
occasional flash of IR icon on receiving unit - that's it. Please take a look:
int main(int argc, char **argv)
{
unsigned char buffer[256+3]="";
buffer[0]=7; // CMDsethost;
buffer[1]=3; // addr=3
if(lnp_addressing_write(buffer,2,6,0)) // 3rd arg = addr of target rcx
{ // in this case it is 6
cputs("error");
return -1;
}
cputs("ok");
return 0;
}
Any ideas about what is wrong ?
|
|
Message has 1 Reply:
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|