What's the question? What would happen is what what you've coded...
If this method gets called periodically, the pin will get closed and open
all the time, and would not produce a stable output when in output mode.



On Mon, Mar 3, 2014 at 1:35 PM, Tim Frisch <[email protected]> wrote:

> Or this code; for example.
> if (!modeButton_.isActivated()) {
> pinI9.close();
>  pinO9 = ioio_.openDigitalOutput(9,false);
> pinO9.write(true);
> } else if (modeButton_.isActivated()) {
>  pinO9.close();
> pinI9 = ioio_.openDigitalInput(9);
> try {
>  if (pinI9.read()) {
> testerReader.setText("ON");
> } else {
>  testerReader.setText("OFF");
> }
> } catch (InterruptedException e) {
>  // TODO Auto-generated catch block
> e.printStackTrace();
> }
>  }
>
> On Monday, March 3, 2014 3:30:46 PM UTC-6, Tim Frisch wrote:
>>
>> What would happen if I were to open a pin as both input and output and
>> read/write to them depending on a switch's state?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to