Troubles when using my first transistor

MarkT:
Opto isolator is a wise precaution, and use twisted pair between it and the Arduino.

Thanks for the reply. What do you mean by twisted pair?

thanks