self-balancing-robot
Dependencies: mbed mbed-rtos Motor
Diff: main.cpp
- Revision:
- 31:aa1ea0973c96
- Parent:
- 30:b1718c4edcd7
- Child:
- 32:c3676d4df853
diff -r b1718c4edcd7 -r aa1ea0973c96 main.cpp --- a/main.cpp Thu Apr 23 20:18:51 2020 +0000 +++ b/main.cpp Thu Apr 23 20:21:45 2020 +0000 @@ -39,7 +39,7 @@ float angleBias = 0; Motor leftWheel(p21, p24, p23); // pwm, fwd, rev leftWheel(p21); -Motor rightWheel(p22, p26, p25); // pwm, fwd, rev rightWheel(p22); +Motor rightWheel(p22, p25, p26); // pwm, fwd, rev rightWheel(p22); /////////////////////////////////////////////////////////////////////////////// @@ -204,9 +204,6 @@ //bluetooth.attach(&bluetooth_update, 0.1); while (1) { - leftWheel.speed(1); - rightWheel.speed(1); - Thread::wait(10000); //bluetooth_update(); //parametersmutex.lock(); // pc.printf("rp: %f, rd: %f, ri: %f, desired_angle: %f\n", rp, rd, ri, desired_angle);