The attached VI is a sample of the drive code we want to use. For why we’re driving servos, that’s going to be a surprise. Anyway, the code can be deployed to the robot via bluetooth, however, I don’t think that the code can progress beyond the ReadMessage VI and I don’t know why that wouldn’t happen. In summation, is the attached code wrong, or would there be a reason for why it wouldn’t work?
Drive Feat Controler.vi (19.4 KB)
Drive Feat Controler.vi (19.4 KB)
Okay. I’m no expert in LabView, but it appears to me that you are doing somehting wrong with the output of the ReadPacket block (not the ReadMessage block).
Your inner loop reads a message and stops breaks out of the loop if the ReadMessage pack is true (right click on the red dot inside the loop and the “Stop if True” is checked). so, you’ve exited that loop and the data comes out of the ReadMessage and is sent to the Read Packet block. However that is inside another While loop. The boolean output of the ReadPacket (“did I get a valid packet?”) comes to the loop condition (that other red dot) and it also has the “Stop if True” checked. So, you outer loop then immediately stops on a successful Read packet. You never get past that block.
Go to www.ftctraining.com and download the templates for LabView. Then put your servo driving blocks inside those loops. You should be happier.
Good luck.
First of all, start with the required template for teleoperate from ftctraining.com. Then you wont have to figue out the bluetooth and the loops etc. Second your move servo commands need hooked up correctly. You only get 1 hitec servo controller so they should both be hooked to the same port (usually 1) and the same controller (usually 2).
Oh, controller is the servo controler, not the actual robot controller, thanks for telling me that. Also, thank you for your concern about the manditory template for the teleop; I didn’t want to post the entire code in context because we were only having problems with that bit of code.