Basic test program to control a gimbal brushless motor with TB6612FNG s
Dependencies: brushlessController_TB6612FNG mbed
Diff: main.cpp
- Revision:
- 2:1302cfb8f0e9
- Parent:
- 0:0b4306ff8df4
- Child:
- 3:afece675a1d5
--- a/main.cpp Fri Jul 17 11:33:31 2015 +0000 +++ b/main.cpp Fri Jul 17 12:16:28 2015 +0000 @@ -21,14 +21,14 @@ Timer changeDir; // Timer for changing the direction bool dir = 0; // Direction of movement -int delay = 10; // Delay between steps +int delay = 1000; // Delay between steps (us) int main() { changeDir.start(); // Start timer while(1) { - if(changeDir.read() > 2) + if(changeDir.read() > 1) { dir = !dir; changeDir.reset();