I tried posting this in the Programming thread a while ago but didn’t get any takers, and the question has come back to haunt me. I use EasyCv2 for Vex and would like to know how to read the values of the 6 interrupt ports (similar to the way that you use GetDigitalInput(I) to read one of the digital input ports). Basically, I want to create something similar to the FVC/FTC competition template, where I can select between autonomous and R/C, but not be limited by the 20 second/2 minute demarcations of the template the way it currently exists. Does anyone know how to do this?
I think that any instructions able to do this will either have to be imbedded in a slug of User Code blocks, or be a chunk of ordinary C code that a User Code block or a User-defined routine refers to.
So… If you are asking if EasyC 2.X exposes a built-in interrupt reader to users, I think you are out of luck. If you are willing to dive into using ordinary C to write an interrupt detector, that is a different kettle of fish.
Invoking a home-brew detector from within an EasyC 2.X routine might be possible. If it is, I’ll leave up to someone else to describe how to do that
EasyC Pro in the Vex mode has a block titled “Interrupt Watcher” which would probably work for you?
I don’t have access to EasyC v2 for Vex right now so I don’t know if there is a similar function.
I haven’t found “Interrupt Watcher” in v2, but I did stumble across the answer to my question in a roundabout way. Under the Input menu, the Ultrasonic Sensor command uses interrupts. You could just send out a dummy output and receive the interrupt input.