test

Dependencies:   mbed

Fork of CubeFine by Li Weiyi

Revision:
1:54a2d380f8c7
Parent:
0:362c1482232c
Child:
2:7964622fb5a5
--- a/Microduino_Motor.cpp	Thu Jun 02 04:03:31 2016 +0000
+++ b/Microduino_Motor.cpp	Fri Jul 01 09:41:15 2016 +0000
@@ -10,23 +10,18 @@
         this->motorIndex = MotorCount++;                    // assign a key index to this instance
         //if (_motor_pinA < NUM_DIGITAL_PINS && _motor_pinB < NUM_DIGITAL_PINS) {
         if (true) {
-#if 0
-            pinMode( _motor_pinA, OUTPUT) ;
-#else
+
             _period_us = 255; // 500Hz
             pwmout_init(&_pwmA, _motor_pinA);
             pwmout_period_us(&_pwmA, _period_us); // 500Hz
             pwmout_pulsewidth_us(&_pwmA, 1);
-#endif
+
             motors[this->motorIndex].Pin.nbr_A = _motor_pinA;
 
-#if 0
-            pinMode( _motor_pinB, OUTPUT) ;
-#else
             pwmout_init(&_pwmB, _motor_pinB);
             pwmout_period_us(&_pwmB, _period_us); // 500Hz
             pwmout_pulsewidth_us(&_pwmB, 1);
-#endif
+
             motors[this->motorIndex].Pin.nbr_B = _motor_pinB;
 
             this->fix=1;