Cannot make the Wheel_Controller.spin to work with FullDuplexSerial
I am trying to use the Motor Mount and Wheel Kit (#27971) with Position Controllers (#29319).
Trying to use the object I have got from here http://obex.parallax.com/object/663
The problem is when I am just trying to add a serial terminal to the WC_Test_Harness.spin to be able to query position of a wheel and see in terminal the wheel does not rotate in spite I have just only add FullDuplexSerial to the OBJ block and add a line to start it. Without those 2 lines wheel rotates as programmed.
The test harness stops working as soon as I try to add this two lines to the example WC_Test_Harness.spin (the_____ pst: "FullDuplexSerial" _____ to OBJ block and ____pst.Start(31, 30, 0, 115200)_____ to the PUB MAIN)
...
...
OBJ
WCtrl: "Wheel_Controller"
pst: "FullDuplexSerial"
...
...
PUB MAIN | success
..
...
pst.Start(31, 30, 0, 115200)
...
...
Basically once those 2 lines with pst.... added to the test harness it does not rotate wheels at WCtrl.spin_turn(WCtrl#LEFT_TURN, 360) or any other WCtrl commands.
Does anybody knows what could be a problem?
By the way the similar situation happens when I am trying to add a Ping.spin object ( the one from the "Ping Demo")
Does anybody know
Trying to use the object I have got from here http://obex.parallax.com/object/663
The problem is when I am just trying to add a serial terminal to the WC_Test_Harness.spin to be able to query position of a wheel and see in terminal the wheel does not rotate in spite I have just only add FullDuplexSerial to the OBJ block and add a line to start it. Without those 2 lines wheel rotates as programmed.
The test harness stops working as soon as I try to add this two lines to the example WC_Test_Harness.spin (the_____ pst: "FullDuplexSerial" _____ to OBJ block and ____pst.Start(31, 30, 0, 115200)_____ to the PUB MAIN)
...
...
OBJ
WCtrl: "Wheel_Controller"
pst: "FullDuplexSerial"
...
...
PUB MAIN | success
..
...
pst.Start(31, 30, 0, 115200)
...
...
Basically once those 2 lines with pst.... added to the test harness it does not rotate wheels at WCtrl.spin_turn(WCtrl#LEFT_TURN, 360) or any other WCtrl commands.
Does anybody knows what could be a problem?
By the way the similar situation happens when I am trying to add a Ping.spin object ( the one from the "Ping Demo")
Does anybody know
Comments
If not, can you please post all of your code?
When I have add the line "pst: "FullDuplexSerial" to the object block all still works ok...
But when in addition I have add "pst.Start(31, 30, 0, 115200)" to the PUB MAIN it behaves like this:
1. upon Run / Compile it compiles successfuly
2. then it runs and light the RED LED (as well as expected)
3. Them when I push the button it blionks the RED LED (while the expected result it should light the GREEN LED and move wheels).
The WC_Test_Harness.spin code is here (as well I attach the both files of the project for your convenience).