Olimex Support Forum

Others => UEXT => Topic started by: marcbas2 on February 10, 2013, 03:16:35 PM

Title: MOD-IO relay status
Post by: marcbas2 on February 10, 2013, 03:16:35 PM
Hi,
I can drive relays on MOD-IO borad, it works fine.
Is there a way to read the status of relays?

Thanks,
Marc
Title: Re: MOD-IO relay status
Post by: selfbg on February 11, 2013, 11:06:26 AM
Hi Marc,

There is no direct way to do that. You could make some hardware magic to use digital inputs.

Best regards,
Stefan/Olimex
Title: Re: MOD-IO relay status
Post by: marcbas2 on February 11, 2013, 12:38:52 PM
OK. Thanks for replay.

Marc
Title: Re: MOD-IO relay status
Post by: veseo on February 22, 2013, 09:45:02 PM
The way that I'm using is to assign a byte into my program area that is written an relay command, so that this byte contain the status of the relays.

You can get wrong information if you reset only one of your boards, to solve this you can periodically force the relay state via I2C and reset them in the begin() of your application.

This should let you have consistent information.

Regards,
Dario.