The DigitalIn Interface can be used on any pin with a blue label.
The pin input is logic '0' for any voltage on the pin below 0.8v, and '1' for any voltage above 2.0v. By default, the DigitalIn is setup with an internal pull-down resistor.
@Alexandre Nunes - the pins corresponding to the two LEDs for the Ethernet PHY are not addressable using DigitallIn().
Calling Ethernet.link() would be the correct way to see if your PHY has link or not, if that's what you're ultimately trying to determine.
@Prashant Achari
It is probable that you can, but using DigitalIn() may not be the best (or a workable) way to do it. It may also depend on your ADC (the serial protocol, # of bits/sample, # of channels). This would be a question best raised in the forum with more complete information, if you have not done so already.
-
@Charles Lee
Where to connect the other switch pin to depends on how you want the switch to work (high or low when pressed, and whether or not you are using internal or external pullups). This would also be a good question to ask in the forum.
@Alexandre Nunes - the pins corresponding to the two LEDs for the Ethernet PHY are not addressable using DigitallIn().
Calling Ethernet.link() would be the correct way to see if your PHY has link or not, if that's what you're ultimately trying to determine.
----
@Prashant Achari
It is probable that you can, but using DigitalIn() may not be the best (or a workable) way to do it. It may also depend on your ADC (the serial protocol, # of bits/sample, # of channels). This would be a question best raised in the forum with more complete information, if you have not done so already.
---
@Charles Lee
Where to connect the other switch pin to depends on how you want the switch to work (high or low when pressed, and whether or not you are using internal or external pullups). This would also be a good question to ask in the forum.
How to use switch button ANDed with internal(embedded) LEDs to command external LEDs?
For example:
if(led1==1&sw1==0) led1 is internal or embedded.
LEDred7 = 1; external LED.
Thank you in advance.
How to use switch button ANDed with internal(embedded) LEDs to command external LEDs?
For example:
if(led1==1&sw1==0) //led1 is internal or embedded.
LEDred7 = 1; //external LED.
Thank you in advance.
if(led1==1&sw1==0) //led1 is internal or embedded.
LEDred7 = 1; //external
That being said, do you have a whole program?
I would like to see what else you defined in there.
Lerche
Feliciano:
code tags.
<<code>>
if(led1==1&sw1==0) //led1 is internal or embedded.
LEDred7 = 1; //external
<</code>>
That being said, do you have a whole program? \\
I would like to see what else you defined in there.
\\\\
Lerche
I think it would be a good idea to show some code examples here about the possible pinmodes. (PullUp, PullDown)
The only thing mentioned here is that there are default pulldown resistors present, but NOT how to change this.
Is'nt this the right place for some explanation about this with small examples?
I had to search all over the site for more information about this subject.
Regards, LvdK
Hi Mbed team,
I think it would be a good idea to show some code examples here about the possible pinmodes. (PullUp, PullDown)
The only thing mentioned here is that there are default pulldown resistors present, but NOT how to change this.
Is'nt this the right place for some explanation about this with small examples?
I had to search all over the site for more information about this subject.
Regards, LvdK
Please login to post comments.