Jump to content


  • Content Count

  • Joined

  • Last visited

About miguelzea35

  • Rank
    Noob Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I tried another code to prove only one encoder but think I can't use HIGH and LOW for interrupts in Energiai nt A = PD_1; //variable A a pin digital 2 (DT en modulo) int B = PD_2; //variable B a pin digital 4 (CLK en modulo) float GRADOS = 0; int ANTERIOR = 0; // almacena valor anterior de la variable POSICION volatile int POSICION = 0; // variable POSICION con valor inicial de 50 y definida // como global al ser usada en loop e ISR (encoder) void setup() { pinMode(A, INPUT); // A como entrada pinMode(B, INPUT); // B como entrada // pinMode(23, OUTPUT);
  2. I'm trying to read two encoders to know the angular position using interrupts but something is wrong, the code compiles but in serial just prints "0", what can i change? volatile long Left_Encoder_Ticks = 0; volatile bool LeftEncoderBSet; #define Right_Encoder_PinA PC_5 #define Right_Encoder_PinB PC_6 volatile long Right_Encoder_Ticks = 0; volatile bool RightEncoderBSet; void setup() { Serial.begin(9600); SetupEncoders(); } void SetupEncoders() { pinMode(Left_Encoder_PinA, INPUT_PULLUP); pinMode(Left_Encoder_PinB, INPUT_PULLUP); a
  3. I want know why my code isn't work, I used to use in TM4C129 and edit the code to used in TM4C123GXL, but it doesn't work. #include <stdint.h> #include "driverlib/sysctl.h" #include "driverlib/qei.h" int pos; void setup() { Serial.begin(9600); // Setup QEI Module SysCtlPeripheralEnable(SYSCTL_PERIPH_QEI0); GPIOPinConfigure(0x00031806); //GPIO_PD6_PHA0 GPIOPinConfigure(0x00031C06); //GPIO_PD7_PHB0 GPIOPinTypeQEI(GPIO_PORTL_BASE, GPIO_PIN_1 | GPIO_PIN_2); // Configure and Enable QEI QEIConfigure(QEI0_BASE, (QEI_CONFIG_CAPTURE
  • Create New...