Proyecto de Tesis en Mecatrónica. Universidad Técnica del Norte. Ernesto Palacios <mecatronica.mid@gmail.com>
Dependencies: EthernetNetIf HTTPServer QEI_hw RPCInterface mbed
Diff: main.cpp
- Revision:
- 33:e6ff02c3e0f5
- Parent:
- 32:4483d6c225e5
- Child:
- 34:bdf918bc9b59
--- a/main.cpp Wed May 07 01:05:05 2014 +0000 +++ b/main.cpp Tue Jun 24 17:42:25 2014 +0000 @@ -29,7 +29,7 @@ QEIHW encoder( QEI_DIRINV_CMPL, // CW = postive; CCW = negative QEI_SIGNALMODE_QUAD, // Absolute encoder - QEI_CAPMODE_4X, // PhA anb PhB + QEI_CAPMODE_2X, // PhA anb PhB QEI_INVINX_NONE // Not inverted index ); @@ -89,7 +89,7 @@ encoder.SetDigiFilter(480UL); // number of clock cycles the signal must be at high to sense it encoder.SetMaxPosition(0xFFFFFFFF); // max number before overflow - may be changed for 360 or a multiple - + encoder.SetVelocityTimerReload( 0xFFFFF ); //*************** Configura Red Ethernet **************************************************// @@ -173,7 +173,7 @@ setTimer2(); // Configurar PTO pin_son = 0; // Servo Apagado por defecto aout = 0.5; // Voltaje de salida 0V por defecto( +-10V! ) - + while(1) {