Library for using the xbee-compatible Bluetooth Bee Module on an m3pi.
Dependencies: SensoryTest
Fork of btbee by
Diff: main.cpp
- Revision:
- 13:4016c362b0d5
- Parent:
- 12:6b5dd9e5469c
- Child:
- 14:7ddbd9f475ad
--- a/main.cpp Wed May 21 11:49:47 2014 +0000 +++ b/main.cpp Wed May 21 11:58:27 2014 +0000 @@ -8,8 +8,8 @@ float speed = 0.5; float correction; - float threshold = 0.5; - float k = -1.5; + float k = -0.9; + thinggy.locate(0,1); thinggy.printf("Line Flw"); @@ -19,7 +19,7 @@ thinggy.sensor_auto_calibrate(); while(1) { - + wait(0.05); // -1.0 is far left, 1.0 is far right, 0.0 in the middle float position = thinggy.line_position(); correction = k*(position); @@ -41,6 +41,7 @@ } - + + } } \ No newline at end of file