output pin written high-led-input pin
will the led turn on?
i intend to turn it off then
turn it on again by making the input pin a low output pin
will it work?
Try it, then please post your code if you run into problems.
Plus.
To get help, you must show us your complete sketch. Attach your code using the </> icon on the left side of the posting menu.
okay
sorry for being lazy
thanks for the reply
A small diagram how everything is connected might also help us to help you.
coolnumber0129:
output pin written high-led-input pin
will the led turn on?
No.
Also don't mess with LEDs without a current limiting resistor.
thanks for the replies
Do this.
- wire the LED's short leg to a 220 or 330 ohm resistor.
- The other end of the resistor goes to ground.
- Wire the long leg of the LED to a digital pin.
When you digitalWrite that pin to HIGH, your LED will light. When you write it to LOW, your LED will go out.
output pin written high-led-input pin
will the led turn on?
i intend to turn it off then
turn it on again by making the input pin a low output pin
will it work?
If English is NOT your native language, please tell us. Your post is broken english.
Please draw a schematic and post a photo of it.
jrdoner:
Do this.
- wire the LED's short leg to a 220 or 330 ohm resistor.
- The other end of the resistor goes to ground.
- Wire the long leg of the LED to a digital pin.
When you digitalWrite that pin to HIGH, your LED will light. When you write it to LOW, your LED will go out.
im trying to make a matrix?
raschemmel:
If English is NOT your native language, please tell us. Your post is broken english.
Please draw a schematic and post a photo of it.
why should i tell you english is not my native language?
it isnt but as long as you can understand it doesnt matter does it?
if you get mad just by reading bad english you shouldnt be on the internet at all
and yes i am a bit annoyed because that first line of your post was so pointless and a bit offensive in my opinion
coolnumber0129:
it isn't but as long as you can understand it doesn't matter does it?
And that was precisely the point.
Who said I'm "mad" ? Did I say that ? I don't think so . Reread my post.
Did it occur to you that there are a gazillion examples of how to wire a led to an arduino on Google ( including code) , and you don't need any English ( other than the code) to understand them ? Regardless of your native langage , if you are on the internet you should know about Google . ( especially the Google Translate feature, which , if you entered your NATIVE language, , would yield a result more intelligible than your broken Engish. )
For example : What is a "led-input pin" ?
Do you see any pin labeled " input" on a led datasheet ? You ask questions that make no sense without a schematc of how you wired it.
High/low , all depends on polarity. Do we know which way you wired it ? (no).
Why expecting a post to be intelligible is "pointless" in your opinion , I cannot understand. The point of asking you to state if English is is your second language (even though it is obvious) is that we can recommend something like Google Translate, which would net you thousands of hits with both schematic and code. What is ths point of posting an English reply to your post if you are not going to understand it ?
And then that leads us to the point of my question, which is, if you answer "yes" to the question that English is your second language then we can recommend you post on the International Forum, where you might be able to post in your native language ( depending of course on what that is. ) Is that a secret ? Is there any reason you cannot tell us your native language ? ( is that "confidential" ?) Why is it offensive to state the obvious ? (that your English is broken) It's not like THAT is a secret.
sorry i had a bad day
no excuse i know but...
sorry
input pin meant a digital pin configured as an input pin
and the '-' thing meant wire(connected)
i never knew about this international forum thing
and i never bothered to say english is not my native language because i never knew it would matter
and it wasnt offensive
i just had a bad day and was angry in the first place(i was the one who was 'mad')
and i just took offense so easily
when it was obvious that i shouldnt
sorry
i hope you understand and forgive me although there is no reason you must
nput pin meant a digital pin configured as an input pin
and the '-' thing meant wire(connected)
This is a technical forum. We are all about the details, like what a led has to do with a pin configured as an "input" ?
Do uou see a conflict there ?
Is there any mention of a "switch" or "button" in your post ? If not , why is the pin configured as an "input" ?
FYI,
The "-" pin of a LED has a name. It's called the CATHODE.
Can you say "cathode" ?
The "+" pin of a LED has a name. It's called the ANODE.
Can you say "anode" ?
What does any of this have to do with an arduino pin configured as an "input" ?
coolnumber0129:
im trying to make a matrix?
Saying that initially would have saved a lot of time as we would have known why you were trying to do such a thing.
Now that is what you want to do I can tell you where you are going wrong.
You can not set a digital input pin to low, it does not make sense. Switching a pin to be an output and then setting that output low does make sense.
So if you have an output pin set to high and another output pin set to low and connect a resistor and LED in series, across the two pins then yes it will light up, providing the LED is the right way round.
Now to turn this off, you can either set both outputs to high or both outputs to low, or make one or both of the digital pins into inputs.
I hope that helps.
Or:-
I left you the honors of linking your own site
Thank you.
Grumpy_Mike:
Saying that initially would have saved a lot of time as we would have known why you were trying to do such a thing.Now that is what you want to do I can tell you where you are going wrong.
You can not set a digital input pin to low, it does not make sense. Switching a pin to be an output and then setting that output low does make sense.
So if you have an output pin set to high and another output pin set to low and connect a resistor and LED in series, across the two pins then yes it will light up, providing the LED is the right way round.Now to turn this off, you can either set both outputs to high or both outputs to low, or make one or both of the digital pins into inputs.
I hope that helps.
i learned my lesson now
next time i'll be more specific instead of raging for no reason whatsoever
someone told me setting both output pins to high might cause a short
so i was looking for an alternative solution
if that is going to work fine, i'll use that
raschemmel:
This is a technical forum. We are all about the details, like what a led has to do with a pin configured as an "input" ?Do uou see a conflict there ?
Is there any mention of a "switch" or "button" in your post ? If not , why is the pin configured as an "input" ?FYI,
The "-" pin of a LED has a name. It's called the CATHODE.
Can you say "cathode" ?
The "+" pin of a LED has a name. It's called the ANODE.
Can you say "anode" ?
What does any of this have to do with an arduino pin configured as an "input" ?
i dont actually understand how a digital pin configured as input works
but someone on this forum told me that it doesnt work like ground
so i thought maybe if i use that instead of writing high on a digital pin to turn off the led, it would work
but now i know that the 'output+high' solution works, i can stick with that
raschemmel:
How does a LED matrix work ?
thank you! that really helped a lot!
Grumpy_Mike:
Or:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html
and that as well! didnt realize this thread was 2 pages long now
thanks!
someone told me setting both output pins to high might cause a short
No, if there is an LED and resistor between them there can be no short.
dont actually understand how a digital pin configured as input works
but someone on this forum told me that it doesnt work like ground
That is correct, an input is high impedance, that means it acts like the pin was not there, like it had been disconnected.