Go to Post Actually, FIRST Is hoping the reverse, that your bot will be "Ball damage proof" - Rombus [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2013, 01:27
Hypnotoad's Avatar
Hypnotoad Hypnotoad is offline
Junior Assistant Secretary of Moon
no team
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: California
Posts: 114
Hypnotoad is infamous around these partsHypnotoad is infamous around these partsHypnotoad is infamous around these partsHypnotoad is infamous around these partsHypnotoad is infamous around these partsHypnotoad is infamous around these parts
pullup resistor on digital sidecar

Sorry for this basic question, but I am sort of lost at this moment. How do the pull-up resistors function on the digital sidecar. I am well aware of how a pull-up resistor works. I would just like to know how to use it on the digital sidecar in java. I have found no constructors that set this for the class DigitalInput and I have found no methods for that class that do this. Does this need to be done on the digital sidecar itself or am I doing something horribly wrong in the code?
__________________
The following sentence is true.
The preceding sentence is false.
This sentence is false.
This signature is false.
My teeth are false.
Reply With Quote
  #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
  #3   Spotlight this post!  
Unread 27-01-2013, 21:57
Hypnotoad's Avatar
Hypnotoad Hypnotoad is offline
Junior Assistant Secretary of Moon
no team
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: California
Posts: 114
Hypnotoad is infamous around these partsHypnotoad is infamous around these partsHypnotoad is infamous around these partsHypnotoad is infamous around these partsHypnotoad is infamous around these partsHypnotoad is infamous around these parts
Re: pullup resistor on digital sidecar

Thank you! Rep for you.
__________________
The following sentence is true.
The preceding sentence is false.
This sentence is false.
This signature is false.
My teeth are false.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:53.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi