use divice with the poll option?
Donoho
Posts: 3
I am using the BS2p.· The device i would like to poll is the GP2DO2 an IR sensor.· The problem is that the device sends a pulse.· The device will be used to detect objects.· The only way i can use right now is if i make it a subroutine and call it often during the main program.· I would like to have it outside the main program and interupt when it sees an object.· Please any advice is welcomed.
Comments
Dirt simple, isn't it?· With this construction your "background" task get sandwiched in between the main program tasks.· Put your tasks into subroutines, then let each task point to the next -- either the next in sequence or the next that should run based on some unexpected condition.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA