![]() |
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!
My current setup is using a push switch to simulate the gear tooth sensor. I have it hooked up to rc_dig_in11. I have it printing to screen, and when pushed it shows up as 0, otherwise as 1, so looks like the hardware is working. I'm not sure what to do. The counter is still not counting, it just stays at 0. Thanks again for all the help, it is very much appreciated :)!
|
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!
Quote:
|
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!
Quote:
|
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!
Quote:
As I explained yesterday morning, if you want to trigger the encoder interrupt when the switch changes state, you have to put it on digital input 1. |
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!
Quote:
EDIT: YOU GUYS ARE WONDERFUL! I'm so happy it worked!!! THANKS! |
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!
Quote:
Phase A of encoder 1 has always been documented as rc_dig_in_01, and phase A of encoder 2 has always been documented as rc_dig_in_02. The "B" phases for a quadrature encoder can be connected to any other digital inputs, but there is no phase B on a gear tooth sensor, which is why that part of the interrupt code is simply removed to handle a GTS. Digital input 1 on the RC goes to one hardware interrupt on the PIC. Digital input 2 on the RC goes to another hardware interrupt. Changes on digital inputs 3-6 can be configured to cause a third hardware interrupt. If you want to use interrupts, you must use the input pins that support interrupts. (Now why am I suddenly having deja vu?) Congratulations on getting it to work. |
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!
Well, I guess you learn something new everyday (or maybe sometimes it takes a couple of days to understand it) but anyways, this is my first year programming anything, and I was in charge or programming the robot. I had alot on my plate I guess so I'm sorry if some of my questions seemed stupid. I really appreciate all the help, our team didn't have any mentors who knew programming, so I'm really glad I could find an e-mentor! Thanks again, now I just have to finish the rest of the autonomous before Rochester!
|
| All times are GMT -5. The time now is 12:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi