Skip to main content
2 of 2
added 7 characters in body

Always use a series resistor when connecting anything to your IO pins. In many cases you will need one anyway (like driving a LED or a BJT), and in other cases it will not hurt (like driving MOSFET gates or UART lines). A 100 Ohm resistor will limit the current to 50 mA (keeping it within the safe range), while having little effect on your circuit in most cases.