Here's something I wish we could get new folk to understand about the whole way computers work. It's not an embedded thing, it's not an Arduino thing, it's a computer thing. I first heard this explicitly over 30 years ago, but I knew it implicitly before that.
It's the Input => Process => Output model, and the lack of understanding this I'm sure hinders many folk.
This lack of understanding is demonstrated by questions like "can I control my servo with an IR TV remote". The actual answer to that explicit question is a simple "no". The answer to the actual, implicit question, is very likely "yes".
Questions like that indicate that the asker might have a vision of the IR beaming straight into the servo. At very least it means they think the IR needs to be somehow compatible directly with the servo. Of course, that's not true.
Once folk realise that the IR beams into a sensor attached to one side of the Arduino, the Arduino interprets that signal and makes some decision based on the programmer's logic, and controls the servo by sending signals out the other side, things get a lot simpler. The required compatibilities are IR remote to IR sensor and IR sensor to Arduino; and the Arduino with the servo.
That simply is the Input => Process => Output model:
Receive some Input; in my example a TV remote signal in the form of some code
Process that signal by (eg) interpreting the sequence and deciding what to do next, eg move to 27 degrees
Send some Output to the servo to move to the right angle.
Things are soooo much easier to explain, and solutions easier to devise, when this model is understood. In particular, it makes it easier to see how to have more than one input and more than one output. If the input from the remote indicates a servo move to 27 degrees, only do that if the RTC says it's not Tuesday; if it is Tuesday, sound a buzzer instead.
I agree.
Sometimes I try to get the question guys to think about what it is they want and how they think they might do that, without dropping Arduino lingo or casually misusing electronics words, and just working out "in your own words" a flow chart, an outline.
You find out if they really want to do this thing or if they're just shopping for a quick fix.
[It's been a while since I were in a classroom, the pencil and paper thing is very 20th Century.]
"The sooner you point me to that library, mate, the sooner I'll be able to proclaim my genius!"
JimboZA:
This lack of understanding is demonstrated by questions like "can I control my servo with an IR TV remote". The actual answer to that explicit question is a simple "no".
And if the question is posed in those naked terms, some of us (not naming names) are inclined to say exactly that.
JimboZA:
The answer to the actual, implicit question, is very likely "yes".
If the question is inherently reasonable.
JimboZA:
Once folk realise that the IR beams into a sensor attached to one side of the Arduino, the Arduino interprets that signal and makes some decision based on the programmer's logic, and controls the servo by sending signals out the other side, things get a lot simpler. The required compatibilities are IR remote to IR sensor and IR sensor to Arduino; and the Arduino with the servo.
So ...
JimboZA:
That simply is the Input => Process => Output model
Or perhaps in more detail, Input => Process input => Decide => Process output => Output model
JimboZA:
In particular, it makes it easier to see how to have more than one input and more than one output.
Input1 => Process input =>\\ //=> Process output => Output1
Decide
Input2 => Process input =>// \\=> Process output => Output2