Sorry for the necro post. Is the right place to ask questions on this library?
I am using QuadEncoder_interrupt_pins. I have changed my HW to use the same pins as the example. Have a couple of questions.
1. In the library, I see that the index counter is defined as uint32_t, but in the running code, an underflow (negative index count) is 16 bits. Why is this? For a motor spinning at 3600 RPM, this would mean rollover ever 18.2 minutes. Is there a way to modify this easily?
2. Is there a way to print out the quad encoder configuration. There's no easy way to determine if the defaults chosen are applicable to the user. I see a method defined, but I don't know how to use it. A minimal example would be helpful. This is not meant as a knock, but if would be really helpful to new users, if there was more documentation, either in the source, or in a wiki. The examples given do not seem to clearly showcase many of the abilities of this library, and it is a bit confusing, at least to me.
3. What is the difference between home and index in a practical sense?
If I were to use this library, I'd like to understand it's practical limitations. What happens when there is a position over or underflow? The HW register is limited to 32 bits. For a motor running continuously, (at high speed) rollover could occur in 19 hours or so, if starting from zero. Practically, I won't run at max speed, but I'd like to be able to handle the situation. There are interrupts defined, but they are disabled, and there is no code. From a practical sense, what might make sense?
My target application is an electronic leadscrew for a lathe, which could be used for cutting threads. I need to work through many of these issues, so that I'm not surprised, or at least I don't cause severe mechanical damage. The main motor is 2 HP, so if things crash, it would not be a good thing.
Thanks for your help.
I am using QuadEncoder_interrupt_pins. I have changed my HW to use the same pins as the example. Have a couple of questions.
1. In the library, I see that the index counter is defined as uint32_t, but in the running code, an underflow (negative index count) is 16 bits. Why is this? For a motor spinning at 3600 RPM, this would mean rollover ever 18.2 minutes. Is there a way to modify this easily?
2. Is there a way to print out the quad encoder configuration. There's no easy way to determine if the defaults chosen are applicable to the user. I see a method defined, but I don't know how to use it. A minimal example would be helpful. This is not meant as a knock, but if would be really helpful to new users, if there was more documentation, either in the source, or in a wiki. The examples given do not seem to clearly showcase many of the abilities of this library, and it is a bit confusing, at least to me.
3. What is the difference between home and index in a practical sense?
If I were to use this library, I'd like to understand it's practical limitations. What happens when there is a position over or underflow? The HW register is limited to 32 bits. For a motor running continuously, (at high speed) rollover could occur in 19 hours or so, if starting from zero. Practically, I won't run at max speed, but I'd like to be able to handle the situation. There are interrupts defined, but they are disabled, and there is no code. From a practical sense, what might make sense?
My target application is an electronic leadscrew for a lathe, which could be used for cutting threads. I need to work through many of these issues, so that I'm not surprised, or at least I don't cause severe mechanical damage. The main motor is 2 HP, so if things crash, it would not be a good thing.
Thanks for your help.