How to add simple Servo code from a Tutorial?

Yes, you can place the appropriate resistors to reduce the volume.
But, the place of connecting the resistors in the image is incorrect.
Must be placed in series with the speakers.
It can also be adjusted using a potentiometer.
However, it must require lower current flow that can be passed safe as described above.

It is better to think of what is output from the PIN as a "signal" rather than a "power".
"Power" is output from 5V, but it is not very powerful either.
Please think the power output of the 5V pin is;
About 400mA when connected to a USB port
About 100mA when connected to a barrel jack

Calculated from Ohm's law, if the resistance of the circuit is 220Ω, the current is limited to about 23mA, so not a problem.
The 20mA I mentioned earlier is due to the value including the safety margin.

Applies to PIN. For 5V, follow the conditions described above.
But, there is one misunderstanding.
Current limiting means passing, not output.
In other words, if 100mA is output from the 5V pin to the load and the wiring on the opposite side of the load is a PIN, so 100mA will pass through the PIN.
This is not output 100mA from the PIN, but it is passing 100mA and destroys the internal circuitry of the PIN.


Exactly.

1 Like