Now the LED always started after a short time. In the serial monitor there was always 1 and 0. However, often 1. Why is that? Is my Funduino Uno broken? Or are pins linked somehow?
I connected a 100 ohm resistor to PIN 10 and then an LED. Then to the ground.
What can I do so that if I have not yet connected a switch etc. the LED does not just go on? (After that I tried it with a switch and resistor. That didn't work either.)
Where can I draw a circuit diagram? I've now attached a photo. At first I had 5V and a switch on PIN 12. It didn't work out that way (same problem as described above, only with one switch). So I tested it without anything.
What's going to flip the LED state? As written, once HIGH the output pins stays in that logic level.
The LED can be wired to be On when the Output is LOW (called sinking) or the LED can be On when the Output is HIGH (called sourcing.) in either case, your software must inspect the input pin and then set the output pin: so
if (input condition) {
do the true;
}else{
do the false;
}
Is there some kind of f'n game going on where points are awarded for being the first to answer something obvious? Like you are so proud of your karma points ... no one cares, especially me. I'm in the forum to assist the Op, not to collect karma... far too old for games.
My statement was at least followed by the pseudo-code to assist the Op to know what to study in the Reference section. Many self-starters know if(condition) but have not learned the if () then {}else{} construct.
I don't worry about karma... I thought I lost all that and my post count too with the forum upgrade but I wasn't really paying much attention to that before, either.
Yes, agreed.
But Newby coders are often overwhelmed; you answer your way, I will answer mine. I do not get into the forum as often as the more enthusiastic folk like you, but I do try. In the end analysis, we both wish to move the Op over whatever hump they are experiencing.
I have been around since 2012; I have a tough skin. My long absence was primarily because of members treating newbies (and often senior members) like poopoo. I also moderated the stm32duino forum for a time and assisted with the transition of moving to the new STM owned and operated forum.
OP never came back to say, "what did you mean" or "I don't get it"...
IMHO, you are "pressuring" the Op based on your own expectation. Op is likely off visiting family & friends and not fully engaged. The Forum system will notify you when the Op reappears and hopefully will have what you expected.
I have taught adult computer classes and developed courses and the classroom is a difficult place to be, but there are rewards. Online training is much more formal than a forum; I think of the forum as two people who start talking but get on separate trains a few minutes later. Can I transfer enough information and provide some guidance to make a difference. I do not like to ping-pong in a forum; sometimes I'm spot-on, sometimes not so much. Sometimes the student gets an A++ and sometimes they get an F. Ops have a responsibility to respond, but individual initiative should not be on a timetable IMO.