admin
|
> >Dear administrator: > >I'm a SRV-1(not Blackfin version) user. I have some problem. >I try to run a test c interpreter program like below: > >main() { >int front; >front=ir(1); >motors(50,50); >print(front); >} > >and enter 'Q' in the pySRV1Console. The message window gets response ir value, >but the machine doesn't move forward. Then i change the motors(50,50) to >motors(200,50), i get a "invalid value" error message(it seems that motors() >function call success),however motors(50,50) can't work. Do you know where is >the problem? > >And another question is how to communication between two robots by c interpreter? >Does it have any method? Example: A,B robot can send "hello" message between >each other. > >I hope that you can give me help by the questions. Thanks a lot. The valid range of values for the motors command would be -100 to 100, so that would cause the error. You should add a delay() call after the motors() call, because as soon as the C interpreter exits, it turns off the motors. There is an input() command you can use to receive data from the serial port. If the XBee modues are configured to send to a broadcast address, you could send messages between different robots.
|