Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 1 month ago.
I want an InterruptInOut
It's fairly common for devices to use an I2C-style tri-state data line to indicate completion of a measurement. For example, the SHT-75 humidity sensor does this. You send it an I2C-style measurement request, and then some time later it pulls the data line low.
Is there any way to do this cleanly with mBed using interrupts to detect the low data line? There isn't an `InterruptInOut` class - which would be ideal - and it isn't clear to me what the constructors/destructors of `InterruptIn` and `DigitalInOut` actually do.
Am I going to have to write my own `InterruptInOut` class?
1 Answer
8 years, 1 month ago.
Possibly, it is fairly straight forward if you check the source code. However you can first try making an InterruptIn + DigitalInOut on the same pin. I expect that to work, but not 100% sure.