para el ventilador

Dependencies:   QEI FastPWM

Revision:
3:45299e7882b9
Parent:
1:aa5df1878126
Child:
5:bd5fc0510e7b
diff -r 6f618b905d4f -r 45299e7882b9 main.cpp
--- a/main.cpp	Thu Apr 16 13:22:16 2020 +0000
+++ b/main.cpp	Fri Apr 17 11:22:43 2020 +0000
@@ -12,10 +12,7 @@
 //      OBJECT CONSTRUCTION
 // ******************************
 
-//Ticker interrupt
-//Ticker ticker_int_10us; // Ticker interrupt
-
-Serial pc(USBTX, USBRX);
+Ticker ticker_int_10us; // Ticker interrupt
 
 
 // ******************************
@@ -31,13 +28,15 @@
 
 
 int main(void) {
-
+    Buttons_Initialize();
+    ticker_int_10us.attach(&Ticker_ISR, 0.01);
     TFT_Interface_Initialize();
     Stepper_Driver_Init();
     Stepper_Calculate_Period_Ramp();
     
     while(1){     
          Stepper_Driver_State_Machine();
+         TFT_Encoder_Interaction();
     }
   
     return 0;
@@ -46,11 +45,8 @@
 
 
 // Ticker Interrupt Service Routine
-//void Ticker_ISR(void){
+void Ticker_ISR(void){
    
-   //Stepper_Driver_Pulse_Signal_Update();
-   
-   /* 
     static uint8_t conta_10ms = 0;
     
     Button_Debounce();
@@ -61,5 +57,5 @@
         conta_10ms = 0;
         Encoder_Read();
     }
-    */
-//}  
+    
+}