View Single Post
  #2   Spotlight this post!  
Unread 27-01-2013, 01:32
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: pullup resistor on digital sidecar

The pull-up resistor can't be disabled/enabled in code. It is physically connected at all times.

You can test this by measuring the voltage on the SIG pin on any of the DIO on the sidecar. You'll see it's pulled up.

In terms of how to use it in Java, I always connect any switches between GND and SIG on the DIO. This takes advantage of the pull-up resistor, but the side-effect is that you will have reversed logic in your Java program.

When the switch is closed, the DIO will go to GND, and you'll see a logical 0 (false).

When the switch is open, the DIO will be pulled-up, and you'll see a logical 1 (true).
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote